$ _ SERVER ['remote _ host'] related questions! Guidance from Daniel

Source: Internet
Author: User
$ _ 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
Example:

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 --------------------
Reference:
Online answers. thank you!


The HOST where the current program is located is $ _ SERVER ['http _ host'].

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.