Forum Moderators: phranque

Message Too Old, No Replies

Tools to Restrict Access To Links.

Other than HTTP_REFERER.

         

NickCoons

9:58 pm on Oct 17, 2003 (gmt 0)

10+ Year Member



I have a weekly broadcasted radio show here locally, and each week the shows are recorded and uploaded to our site to an archive so people can listen to past shows. We also have guests on the shows, and they like to link to the show in which they appeared.

We encourage them to link to the audio archive page, but many people tend to link directly to the audio. So when someone browsing their site clicks the link, their media player is launched and they are never taken to our site, so we are not given credit for providing the show.

What I'd like to do is create a script that would check to see where the user is at when they click the link to the audio. If they click on the link from our audio archive page, it takes them to the audio. If they click on that same link from anywhere else, then it takes them to the audio archive page so they can from there click on the audio.

My original thought was to use the HTTP_REFERER environment variable. I have heard that this is unreliable since the HTTP_REFERER variable may sometimes be left blank, or not contain the right information. If this is the case, then those users would never be taken to the audio.

Does anyone have any other suggestions on how I might accomplish this? How about having the audio archive page place a cookie on the user's machine, and then the script used to retrieve the audio would check for the existance of this cookie? Would that be more reliable than using the referer?

plumsauce

8:49 am on Oct 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



your scenario is familiar, and your
conclusion with respect to the referer
is correct. see sticky for possible
leads on solutions.

+++
edited for spelling error