$ _ SERVER [& # x27; REMOTE_HOST & # x27;] problem! For example, I want to test the program in VPS and get the domain name of the remote host, my SERVER is IIS, and no CSDN mentioned above: & nbsp; modifying the hostnamelookups variable on in the conf file does not change to APACH $ _ SERVER ['remote _ host! Guidance from Daniel
This is probably the case: In the VPS test program, $ _ SERVER ['remote _ host'] wants to obtain the domain name of the remote host.
However, my server is IIS, and no CSDN mentioned above: modify the hostnamelookups variable in the conf file on
The reason for not changing APACHE is that you are not used to it for the moment. I don't want to change it for the time being. the problem cannot be solved by the supervisor.
$ _ SERVER ['remote _ host'] the obtained IP address is always/but not a domain name.
Similarly, I used the ASP language: Request. ServerVariables ("REMOTE_ADDR") but got the domain name.
Their functions are the same. Why does one obtain an IP address.
I can use it only after I change it.
The PHP language obtains the domain name of the remote access HOST!
Php? Server REMOTE_HOST
------ Solution --------------------
Online answers. thank you!
The HOST where the current program is located is $ _ SERVER ['http _ host'].