Use php to obtain the ip address of the client server .? Phpecho current script SERVER host name:. gethostbyaddr ($ _ SERVER [REMOTE_ADDR]). brhr; echo get the IP address of the SERVER where the PHP script (page) is currently running:. $ _ SERVER
Echo "host name of the current script SERVER:". gethostbyaddr ($ _ SERVER ['remote _ ADDR '])."
"; 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
Http://www.bkjia.com/PHPjc/372090.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/372090.htmlTechArticle? Php echo host name of the current script server :. gethostbyaddr ($ _ SERVER ['remote _ ADDR ']). br/hr/; echo: obtain the IP address of the server on which the PHP script (page) is currently running :. $ _ SERVER...