: & Lt ;? Phpecho & quot; host name of the current script server: & quot ;. gethostbyaddr ($ _ SERVER ['remote _ ADDR ']). & quot; & lt; br/& gt; & lt; hr/& gt; & quot; echo & quot; get the PHP script currently running (page) IP address of the server
"; Echo" obtain the IP address of the SERVER on which the PHP script (page) is currently running: ". $ _ SERVER ['server _ ADDR ']."
"; Echo" get the host name of the server on which the PHP script (page) is currently running :". $ _ SERVER ['server _ name']; echo ''; echo 'Client ip '. $ _ SERVER ['remote _ ADDR ']; echo'
'; Echo 'Client ip'. getenv ('remote _ ADDR'); echo"
"; Echo 'server host ip'. gethostbyname (" www.qq.com ");?>
Run:
Host name of the current script server: XYL-PC
Obtain the IP address of the server on which the PHP script (page) is currently running: 127.0.0.1
Obtain the host name of the server where the PHP script (page) is currently running: localhost
Client ip127.0.0.1
Client ip127.0.0.1
Server host ip61.135.169.105