SyntaxFix
Write A Post
Hire A Developer
Questions
You can use $_SERVER['HTTP_REFERER'] this will give you whole URL for example:
$_SERVER['HTTP_REFERER']
suppose you want to get url of site name www.example.com then $_SERVER['HTTP_REFERER'] will give you https://www.example.com
www.example.com
https://www.example.com