Jump to content

[SOLVED] PHP - Image Viewer


ciber

Recommended Posts

Ok something now ive been trying to work out for a while with regards to hotlinking ect...

 

Anyways, I want to create a php file that will be able to show an image, but the url will direct to the image.

 

for example if the url is http://www.mysite.com/images/pic.jpg

 

I need it to process the url, like so

http://www.mysite.com/showimage.php?url=http://www.mysite.com/images/pic.jpg

 

does anyone know where i could get a script that can do this for me, that when I put the url in it will display the image in the page.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/112431-solved-php-image-viewer/
Share on other sites

AWESOME! Thanks

 

What im wanting to do is use this so when people visit my site they can see the screenshots still - you see I run a gaming site so I get a lot of hits to my image.jpg files, and im not able to record my hits then.

 

How do you suggest that I do my htaccess so that it will take the url and redirect it to that file and shows the image?

When a user visits the site, with a direct link to an image (eg: www.mysite.com/picture.jpg)

 

Basically I dont want people to hotlink my images onto other peoples sites, but if they visit my site i want it that they are able see these picture (while also recording the visitor hits as well)

 

I want the htaccess to redirect them to the file you have mentioned in the first post, so that the image is shown in the html file.

eg: www.mysite.com/image.php?image=www.mysite.com/picture.jpg

 

does this make sense?

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.