If known, the super-global $SERVER['HTTP_REFERER'] will have that value; but it is not required to be sent by the user agent and can otherwise be spoofed, so you cannot depend on it to be present or correct. For general, non-critical information purposes it's OK to use, but for more critical uses the only real solution is to have query string values in the referring links that you can grab via the $GET array to get the tracking information.