Finding the referrer

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 ??


[email protected]
Webmaster
[b]www.stuff-for-computers.co.uk[/b]

Comments

  • : 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.

Howdy, Stranger!

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

Categories

In this Discussion