Plaindonut Posted August 13, 2007 Share Posted August 13, 2007 I'm looking how to insert a referral header and redirect to another website so that website see me as if I was coming from another domain... This is as far as I have gotten but it does not redirect me, it just posts to the other website... I feel so close, I just need someone to push me over the plank... <?php $opts = array('http'=>array('method'=>"POST", 'header'=>"Referer: http://referrerURL \r\n")); $context = stream_context_create($opts); $fp = fopen('http://sitetosendReferralInfoto.com','r',false,$context); fpassthru($fp); fclose($fp); ?> My problem is that i have a web page that authenticates via referral URL which is poor security practices... this I know. So I want to pass a user through a php script that redirects to this security page and insert the correct referral URL to allow it to pass through just to prove the security issue needs to be addressed. The code above works but it remains on my script domain and I want it to pass all the way through to the domain that is checking the referral. Quote Link to comment https://forums.phpfreaks.com/topic/64735-redirect-and-insert-referral-header/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.