REMbraNT =
I would suggest that you not use php for protecting your images, and instead use the mod_rewrite that can be enabled on the apache web server. I've done testing on this before (Since we are a web host, we like to know what works best for our customers

) And using php will add more overhead than the mod_rewrite will.
Tim