echo "host name of the current script server:". gethostbyaddr ($_server[' remote_addr '). "
"Echo" gets the IP address of the server where the PHP script (page) is currently running: ". $_server[' Server_addr ')."
"echo" gets the hostname of the server where 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 it out:
Host name of the current script server: xyl-pc
Obtain the IP address of the server where the PHP script (page) is currently running: 127.0.0.1
Get the hostname 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
http://www.bkjia.com/PHPjc/372090.html www.bkjia.com true http://www.bkjia.com/PHPjc/372090.html techarticle PHP echo the host name of the current script server:. GETHOSTBYADDR ($_server[' remote_addr ')). Br/hr/;echo Get the IP address of the server where the PHP script (page) is currently running:. $_ SERVER ...