Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Finding the referrer

Anthony@SFCAnthony@SFC Posts: 11Member
Can I use PHP to find out which webpage a surfer was at before mine ??

Specifically I'd like to know if the surfer found me from a search engine, and what search terms they used.

I know webalizer can retrieve this info from log files, but the info does not seem to be available to PHP.

Surely I am missing something obvious ??


Anthony@SFC
Webmaster
[b]www.stuff-for-computers.co.uk[/b]

Comments

  • ManningManning Posts: 1,621Member
    : Can I use PHP to find out which webpage a surfer was at before mine ??
    :
    : Specifically I'd like to know if the surfer found me from a search engine, and what search terms they used.
    :
    : I know webalizer can retrieve this info from log files, but the info does not seem to be available to PHP.
    :
    : Surely I am missing something obvious ??

    I believe $_SERVER['HTTP_REFERER'] is what you're after. The referring information is provided by the client, which may choose not to provide it (or may choose to provide false info -- this seems to be a new way people are advertising their website). So it's not going to be 100% accurate, but the best you can do.
Sign In or Register to comment.