Home >Backend Development >PHP Problem >How to implement pan-parsing in php
How to implement pan-parsing in php: 1. Pan-parse the domain name to the server IP; 2. Create a site with an empty host header in IIS; 3. Use the PHP system variable "$_SERVER[''HTTP_HOST'] "Get the currently visited domain name; 4. Get the user name based on the currently visited domain name.
The operating environment of this article: Windows7 system, PHP7.1 version, DELL G3 computer
How does php implement pan-parsing?
1. Pan-resolve the domain name to your server IP.
2. Create a site with an empty host header in IIS for receiving requests.
3. Get the currently accessed domain name through the PHP system variable $_SERVER[''HTTP_HOST'].
4. Obtain the user name based on the currently accessed domain name, and then obtain other information.
Related introduction:
Pan domain name resolution refers to resolving *. domain name to the same IP.
What is the difference between pan-domain name resolution and domain name resolution?
Pan-domain name resolution refers to: *.Domain name resolution to the same IP.
Domain name resolution refers to: subdomain name. Domain name resolves to the same IP.
Note: A pan-domain name is only meaningful when your space is an independent IP. Domain name resolution does not have this requirement.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to implement pan-parsing in php. For more information, please follow other related articles on the PHP Chinese website!