php - Fake referrer not working -


i'm using code fake referrer of user when clicks on link, make he's coming facebook:

 <?php $ch = curl_init(); curl_setopt($ch, curlopt_url, 'http://bit.ly/randomurl'); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_referer, 'https://www.facebook.com/') $html = curl_exec($ch);    ?> 

but doesn't seem working, referrer see url of code above. how can fix it? , appreciate coding i'm not coder.

i'm using live http headers mozilla

you examining headers sent firefox, referer header setting manually being sent php/curl. different http client , different set of http requests.

  1. firefox request php program (and send normal referer headers it).
  2. your php program request http://bit.ly/randomurl (and send referer header manually specify it).
  3. http://bit.ly/randomurl respond php program.
  4. your php program respond firefox.

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -