phpretard Posted July 29, 2010 Share Posted July 29, 2010 How is it that a site can forward to my site without a trace? www.2mysite.com is forwarding traffic to www.mysite.com but $page_name = $_SERVER['HTTP_REFERER']; echo $page_name; does not show www.2mysite.com as the referring site...how does one hide this? Help? Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2010 Share Posted July 29, 2010 It's not a matter of hiding anything. A script or a browser must explicitly set the HTTP_REFERER header for it to even have a value. $_SERVER['HTTP_REFERER'] is an optional header. It can be present or not and it can be set to anything. For example, most of the web proxy scripts set it to match the domain being requested, so a request passing through such a proxy script would look like is is coming from someone who is already browsing pages on your site. What sort of problem are you having that you are trying to solve? Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092666 Share on other sites More sharing options...
phpretard Posted July 29, 2010 Author Share Posted July 29, 2010 I am trying to block a specific site from referring traffic. The only way I know of is $_SERVER['HTTP_REFERER']... I could say if $_SERVER['HTTP_REFERER'] is empty but that would block direct traffic Any other ideas? Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092671 Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2010 Share Posted July 29, 2010 The only information you receive about any http request is what the browser (or script) supplies when it makes the http request to your site. If 'HTTP_REFERER' is not set, then there is nothing you can do because there is no information to base a comparison on. Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092676 Share on other sites More sharing options...
phpretard Posted July 29, 2010 Author Share Posted July 29, 2010 I do know the url of the referring site I need to block,what can I do with that? Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092679 Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2010 Share Posted July 29, 2010 Nothing. How could you possibly tell if any particular visitor was just on the URL unless the visitor tells you that information when he makes the request to your page? Are you having problems with actual visitors or with a script making requests to your page? What real problem are you having, and 'I am trying to block a specific site from referring traffic.' is not a problem it is what you are attempting to do. Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092683 Share on other sites More sharing options...
phpretard Posted July 29, 2010 Author Share Posted July 29, 2010 The problem is $_SERVER['HTTP_REFERER'] is not reliable. There is a site referring traffic to mine and I do not want them to. Is there another way to identify visitors? I do have server access... IIS6 Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092686 Share on other sites More sharing options...
Jessica Posted July 29, 2010 Share Posted July 29, 2010 There is a site referring traffic to mine and I do not want them to. The tubes are a wild and crazy place. Link to comment https://forums.phpfreaks.com/topic/209246-block-forwarding-url/#findComment-1092694 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.