simple question:
how to find the location (url) where a user came from before accessing my page?
and
how to find the location (url) where a user goes after exiting my webpage?
any ideas i should start in? thank
In PHP, you can use $ _SERVER ['HTTP_REFERER'] to find out where the user came from.
There is no mechanism to find out where the user is going, unless he clicked a link on your site to leave your page. (If this is the kind of output you want to track, you will need to rely on javascript and implement something like tracking outgoing Google Analytics links: http://www.google.com/support/analytics/bin/answer.py? answer = 55527 )
:
, - - , HTTP referer . . rfc2616
, , , script. - , , .
If the pages from the page and the target site are made by you, you can send the URL of the source page in the GET or POST method and grab it at the destination and redirect the user back to this URL.