How do I get the url from which the request was submitted. I tried $_SERVER['REQUEST_URI']; but this gives me the destination url not the source url. Is it possible to get the origin?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
$_SERVER['HTTP_REFERER']
will work, if it is provided by the calling browser. Note that it is provided by the client so it may be empty or faked, so don't trust it security-wise.You are looking for
$_SERVER['HTTP_REFERER'];
Note: