View Full Version : Generate page by image

06-05-2005, 06:55 PM
I need a php script, something along the lines of images/image.php?page=whatever.jpg where clicking on a link to whatever.jpg would pop up a page with a black background and the image in the link centered. this way i dont have to make a separate page for each image. you know what i mean?

06-05-2005, 06:59 PM
i think you need to make a image for each page and then when clicking on the image it opens a javascript window

i have need come along a script wich does what your looking

hope you find what your looking for if you do find a script please let me knoW! :D

06-05-2005, 07:05 PM
I think I sort of know what you mean...maybe this would be better served with a little javascript? I'm no expert at javascript, but something like this:

<a href="picture.jpg" target="new" onClick='window.open("picture.jpg","","width=500px,height=500px,resizable=yes,scrollbars=yes"); return false;'>View this picture.</a>

would that work, dunno....

06-05-2005, 07:37 PM
That should work, but I'm looking to put the pics on a black bg to match the rest of the site, but if I cant find anything else or if no one else can help me, I'll probably use that

06-05-2005, 07:58 PM
I would bet that there is a way to make a black background using some more javascript, but I don;t know how to do it....let me know if you find out.. ;)

06-06-2005, 05:04 AM
bumpity bumpity

06-06-2005, 08:05 PM
this should work for you. Here is the PHP page (called image.php):

$output = '<html><head></head><body bgcolor="#000000">';
$output.= '<div align="center"><img src="'.$_GET['filename'].'"></div>';
$output.= '</body></html>';

echo $output;


and the link that opens the pic:

<a href="image.php?filename=MYFILE.JPG" target="_blank">View this picture.</a>

Replace MYFILE.JPG with the path & name of the image, e.g. pic001.jpg or images/PIC-002.JPG

cheers, hope this helps!

06-06-2005, 11:39 PM
Exactly what I needed! Thanks for the help!