Is there any way to detect if a user acesses a page from an internal link in my site? I was thinking about doing something in php only if a user has already visited a least one page on my site. Is there any reasonably simple way this could be done?
yeah... at the beginning of every page you put this session_start(); if ($visited) echo 'visitor coming from within the site'; else { $visited = true; session_register('visited'); echo 'visitor came from outside the site'; } this will display on every page if the visitor came from within the site or from outside.... but with a few tweaks you'll get what you want
Besides session variables (see the previous post), you can also look at the Referer header. If its beginning matches the Host header, an internal link was clicked. Keep in mind that Referer may be easily forged - don't use this mechanism for anything important. J.D.