Is there a way to....

Joined
May 19, 2007
Messages
24
Reaction score
2
...have a content locker not trigger when the visitor is from a certain referrer? As in when someone comes from youtube the content locker doesn't trigger but when they visit a different page on my site after coming from youtube it will trigger the locker?
 
Well you can use php to do this. I'm assuming you mean as soon as the referrer is from your own site or some other traffic source (second page if they came from youtube) it activates?

You could just blank the referrer, it would be the easiest thing to do.

Code:
<?php
$referer = $_SERVER['HTTP_REFERER'];
$youtube = substr($referer,0,29);
if($youtube != "put the first 29 characters of the url from a youtube video including http to the ? at the end of watch")
{
echo "locker code";
}

I couldn't post the code with if statement properly because of my inability to post urls, so if you don't get it PM me.
Please note that all double quotes in the locker code will need to have a back slash in front of them! This is necessary so the code doesn't think that the quote is the end of the echo. Ex. "<div id=\"link\"></div>"
 
Last edited:
Thanks, looks like something I could use. Is this for a specific youtube URL? To be more specific I'd like to have the locker not trigger if the visitor comes from any youtube page or from another site I deem, like TV-Links.eu or a torrent site. What I'm trying to accomplish is for them to get one free video but when they go to view another then they have to complete an offer. This way they don't get pissed and report the link as bad and I have a repeat customer.
 
Thanks, looks like something I could use. Is this for a specific youtube URL? To be more specific I'd like to have the locker not trigger if the visitor comes from any youtube page or from another site I deem, like TV-Links.eu or a torrent site. What I'm trying to accomplish is for them to get one free video but when they go to view another then they have to complete an offer. This way they don't get pissed and report the link as bad and I have a repeat customer.

It will not show the gateway if the referrer is from any youtube video. Easiest way to have that set up to block youtube and tv-links would be to have the if statement have multiple conditions so that the referrer is not the same as the domains you don't want the gateway to show on. If you pm me a link of the sites you don't want to show the gateway for and the gateway code/activation code, I'll put it into the script so it works for what you need :)
 
Back
Top