Cut & Paste Dynamic PHP Picture Viewer (version 1.0)
Note: Updated Dec 21st. Fixed bug with script not correctly retrieving the images if the web page and the PHP script are not in the same directory.
To use this script, your server simply has to support PHP, as this script references an external PHP file to get the images of the containing directory. The page that will show the pictures itself does NOT have to be a PHP page (ie: .htm works as well).
Step 1: Insert the below CSS and script into the HEAD section of your page:
Step 2: Add the below HTML code to the BODY where you want the viewer to be shown:
Step 3: Finally, here comes the magic external PHP file:
- Download "getpics.txt" (right click, and choose "Save As"), then change its name to "getpics.php" before uploading to your server.
- Upload this file to the directory containing all the images to be shown using this script.
Inside the script of Step 1, change the reference inside:
to correctly point to where the external PHP file is located.