Hi guys, I want to protect the images on my site and stop people from
linking to them.

The images are uploaded and I store the file name in the database, then when
I display the image I do something like this:

<img src=GetPicture.asp?23>

In GetPicture.asp Ive got:

<%
....
SELECT FileName FROM Pictures WHERE PictureID = PictureID
Response.Redirect objRS("FileName")
....
%>

This displays the image, no probs. But I want to stop people from linking to
this image or displaying it on other sites, so I tried:

<%
If Request.ServerVariables("HTTP_HOST") = "www.myURL.com" Then
....
SELECT FileName FROM Pictures WHERE PictureID = PictureID
Response.Redirect objRS("FileName")
....
Else
    Response.Redirect "someotherimage.gif"
End If
%>

However this seems to have no effect, anyone got any suggestions?

Thanks

Sam


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to