Creating seperate index files for each image (or something similar)

Posted by svtVIB, 01-11-2008, 04:19 AM
I created a website and I have an index.html; and in there, I have it linking to a rotate.php file which randomly generates a new image from a directory every time you refresh the page. However, if you right click and try to find the image properties, it shows the rotate.php file instead of the image URL. You can see what I am talking about at <> but be warned, the image it pops out at you may not be work safe!! What I would really like to do, is make it so that others can send the link of the image to whomever they wish... but I was thinking what I would really like is for each image to have its own page. So if someone sent <>"/random/free_cat_sign.jpg" to a friend, they would see something like the front page (with whatever text/html/etc I want on it) instead of just the image itself. It's kind of hard for me to explain, so if you have any questions that I can answer that may help you understand better, please feel free to ask. Thank you. Last edited by bear; 01-11-2008 at 08:48 AM.

Posted by Xeentech, 01-11-2008, 05:00 AM
Well what I'd do is, insted of having a static HTML link to rotate.php for the image, I'd have index.php make HTML that links to a certain IMG.. and under the image you can make a perminant link to the img..

Posted by svtVIB, 01-11-2008, 03:44 PM
Wouldn't this require a separate html file for each image? I have over 700 images on there now and I plan to put on many more.

Posted by svtVIB, 01-11-2008, 03:55 PM
Maybe if I could have the link of every image in the folder sort of redirect to 1 HTML file that would have the image in it. Is there a way to do that? Maybe with the .htacces file?

Posted by nnormal, 01-11-2008, 04:35 PM
if you wanted to set the image from the url you could use HTML DOM Location Object http://www.w3schools.com/htmldom/dom_obj_location.asp Last edited by nnormal; 01-11-2008 at 04:39 PM.

Was this answer helpful?

 Print this Article

Also Read

How to backup database (cpanel server)

Posted by hbhb, 01-13-2008, 09:19 PMHi, I have a crucial database (mysql). My server is running...

please Recommendation ( spam protect )

Posted by endin, 06-26-2008, 08:30 AMHi, please Recommendation to manage my server please...

Not receiving some emails

Posted by Kain, 12-20-2007, 07:09 AMI've got a weird one here. A client is not receiving some...

PHP Foreach Loop Issue...

Posted by Calibur747, 02-12-2011, 05:09 PMHello WHT, I am having an issue where some users are...

Question about Server Load?

Posted by olddocks, 01-10-2008, 07:09 PMi run about 3 sites all on a shared server with bluehost....