You might use $_SERVER['HTTP_REFERER']
but take in mind that is not always sent so check for its existence and think about a fallback!
You might use $_SERVER['HTTP_REFERER']
but take in mind that is not always sent so check for its existence and think about a fallback!