Search code examples
javascriptphphttp-refererreferer

Can I get the url referral of the original referral website?


is it possible to get the original referrer in php ie.

google.com -> yourwebsite.com -> mywebsite.com

is it possible to get google.com as url referer on mywebsite.com if a visitor click on google.com then yourwebsite.com then mywebsite.com

and can i know that the visitor originally came from google.com at the point of mywebsite.com

i am trying

session_start();
if(!isset($_SESSION['org_referer']))
{
    $_SESSION['org_referer'] = $_SERVER['HTTP_REFERER'];
}

Solution

  • no, its not possible, http is by definition a stateless protocol