inVINCEable Posted January 21, 2009 Share Posted January 21, 2009 Hey, Ok, so I have a PHP application that is pretty concerned with security. Anyways, I am looking for a way to blank the referrer using PHP. I have been told it really isn't possible using PHP since all browsers behave differently. The best solution I have been told is to forward to my script, say test.php that is located on https://mydomain.com/test.php and then perform the redirect from the there and it will blank the referrer since it is using https and browsers do not/cannot forward the referrer information when the file is using SSL. Can anyone confirm/deny/offer suggestions? Thank you in advance. Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/ Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 referrer is send via the browser.. if you site is contactinging anther site then you could use Client URL (CURL and change the referrer to anything you like) if it to redirect users then So if you used <a href="http://www.google.com">google</a> referrer is send (via your browser) BUT using header should NOT pass a referrer (double check that) ie <?php header("location: http://www.google.com"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741680 Share on other sites More sharing options...
inVINCEable Posted January 21, 2009 Author Share Posted January 21, 2009 I see I see: So Lemme check that out mate Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741687 Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 if you don't normally use header then you may want to create a redirect page, as you can't have any thing displayed before the header ie <?php header("location: {$_GET['url']}"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741690 Share on other sites More sharing options...
inVINCEable Posted January 21, 2009 Author Share Posted January 21, 2009 Yep, ok, ill be back in 3 minutes im going to test this thing out Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741694 Share on other sites More sharing options...
inVINCEable Posted January 21, 2009 Author Share Posted January 21, 2009 Ok, Sweet! Looks like header() doesn't send a referrer! That is pretty neat... so it is my understanding that people won't be able to tell where traffic is coming from when using header() to redirect them to their site, so they won't be able to tell people are coming from my site? Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741699 Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 referrer isn't much good really but the logs on the site to are re-directing people to will appear as if they the people entred the site directly (via the address bar) NOTE: I have not done my own testing on this (so i am not 100% sure) but it should be as described, of course if someone tell them they was directed from your site then theirs not much you can do lol Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741701 Share on other sites More sharing options...
inVINCEable Posted January 21, 2009 Author Share Posted January 21, 2009 MadTechie: Lol, I know. I am just saying as far as they know, the referrer shows nothing so there is no way they can tell unless someone tells them Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741703 Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 correct Referrer will be blank Quote Link to comment https://forums.phpfreaks.com/topic/141683-blanking-the-referrer-using-sslhttps/#findComment-741706 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.