Jump to content

Recommended Posts

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

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?

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.

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.

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.