How PHP Gets the domain name that is currently accessed
I have a domain name, resolved to the B domain name, and then access a, I want to use PHP to get a domain name, but the printed $_server[' Http_host ' is a b domain, PHP has a way to directly get to a domain?
Echo '';
Print_r ($_server);
Exit
Results such as:
------to solve the idea----------------------
How does a domain name resolve to the B domain?
If you can tolerate JS, use location.href jump to B
Then on the B site $_server[' Http_referer ' will find the URL of a
------to solve the idea----------------------
I mean, in the a site with JS Jump
------to solve the idea----------------------
302 redirects don't know how to capture
If it is JS jump, there is referer can see
------to solve the idea----------------------
Your so-called a domain name resolution to the B domain is how to get
Domain name can only be resolved to IP
------to solve the idea----------------------
Did you use a proxy?
------to solve the idea----------------------
I have an a domain name, resolved to the B domain name?
Don't understand