Jump to content

Hot Link Image Viewer


ciber

Recommended Posts

Hi,

 

I have a big issue with my site, what is happening is im getting close to 3000 links to my images from forums and site - problem is I want the people to be able to view it from my site but i dont want it to be viewable on the site.

 

I tried playing around with some PHP as I wanted to get it to make the image viewable through php.

 

My idea was to take the source url and place it into an <img src=" "> but I dont know how to do the htaccess to work so that the image url and what should be put inbetween the " " to get the link there.

 

Does anyone know if this is possible? if so how can I do it then?

 

Thanks

Link to comment
Share on other sites

put this in a your .htaccess file of the directory that your images reside:

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://([^.]+\.)?domain\.com/ [NC]
RewriteCond %{HTTP_USER_AGENT} !(googlebot-image|msnbot|psbot|yahoo-mmcrawler) [NC]
RewriteRule \.(bmp|gif|jpe?g|png)$ - [NC,F]
</IfModule>

 

Link to comment
Share on other sites

Ive done that already,

 

What is happening now is

 

User visits from other site > htaccess blocks user > redirects to page saying "no access

 

what i want it to do is,

 

User visits from other site > user gets redirected to viewing page > image viewable

I want to use it so that they get re-directed to a page where the image is viewed, so that I can at least track the hits and the image is not being viewed without the sites borders around it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.