The Code-Bin
PHP Image Script
Posted by: Stephen | November 22, 2007 @ 2:11pm

PHP Code



Syntax Highlighting





Author Comments
This is about the simplest and secure image script. While I give no warranties or guarantees about this script's usefulness, it essentially makes it impossible for anyone to get outside of your specified folder and roam around your site.

This script will allow you to show images, but only explicitly specified extensions can be viewed.

Why is this script better than most others?
This script limits viewing images to certain types.
You show images in any subfolder under $folder.
Users can not access any folder up from $folder.
Nice error messages.
Rating


4.48 / 8
498 Votes