Jump to content

$_SERVER['HTTP_REFERRER'] does not work


Recommended Posts

 

 

 

HI

I hear If I write "echo $_SERVER['HTTP_REFERRER']; " and anybody search in google and find my site in there and come to my site by using google It will print what he has been search in google.I do that And I put that code in my site and I came from google to my site but it didn't print anything.How should I solve the problem?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/190754-_serverhttp_referrer-does-not-work/
Share on other sites

You do realise it's:

 

echo $_SERVER['HTTP_REFERER'];

 

And not:

 

echo $_SERVER['HTTP_REFERRER'];

 

There is no double R.

 

This is taken directly from the PHP Manual, something you should've looked at:

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

 

I highlighted the important parts.

 

Regards,

Project Fear

You do realise it's:

 

echo $_SERVER['HTTP_REFERER'];

 

And not:

 

echo $_SERVER['HTTP_REFERRER'];

 

There is no double R.

 

This is taken directly from the PHP Manual, something you should've looked at:

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

 

I highlighted the important parts.

 

Regards,

Project Fear

Thanks for your reply But it didn't work either:

echo $_SERVER['HTTP_REFERER'];

 

Could you give me an example please?And could you show me a site that use that?

 

Thanks

You do realise it's:

 

echo $_SERVER['HTTP_REFERER'];

 

And not:

 

echo $_SERVER['HTTP_REFERRER'];

 

There is no double R.

 

This is taken directly from the PHP Manual, something you should've looked at:

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

 

I highlighted the important parts.

 

Regards,

Project Fear

Thanks for your reply But it didn't work either:

echo $_SERVER['HTTP_REFERER'];

 

Could you give me an example please?And could you show me a site that use that?

 

Thanks

Could some one helps me?

 

Thanks

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.