Jump to content

Recommended Posts

$_SERVER["HTTP_REFERER"]

 

Yes this will work but only if the other site sends the correct headers you can do something like

 

if($_SERVER["HTTP_REFERER"] == 'www.specificsite.com'){// do code here}

 

This will work about 99% of the time but again if the site is a bit messed up you may not get the information, its header specific.

From what I have researched this method is not very secure. The refer is sent by the browser to the server which mean the it can be easily be change. I want user to be rewarded if they come to my site by a referred site. By using $_SERVER["HTTP_REFERER"] it looks like some users would not be rewarded because of browser error and some will be able to manipulate it and get rewarded over and over.

If you have no control over the refering site, then I'm afraid you're out of luck; that's the only thing offered.  Your only consolation is that even though it's fairly easy to spoof (all you really have to do is edit a file on your computer), most people barely know how to turn on their computer.

 

Now, if you DO have control over the refering sites (as in, you can insist certain pieces of code be transmitted from them, look into token passing.

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.