PHP obtains the instance code of the client and server IP address. The PHP code for obtaining the IP address of the client and server is as follows :? Phpecho (1) the IP address of the user who browses the current page is:; echo $ _ SERVER [REMOTE_ADDR]; echobr; echo (2) view the following code when PHP obtains the IP address of the client and server:
-
- Echo "(1) the IP address of the user who browses the current page is :";
- Echo $ _ SERVER [REMOTE_ADDR];
- Echo"
";
- Echo "(2) the IP address of the user browsing the current page is :";
- Echo getenv (REMOTE_ADDR );
- Echo"
";
- Echo "the IP address of the host www.ite5e.com is :";
- Echo gethostbyname (www.baidu.com );
- ?>
The instance code for the http://www.bkjia.com/PHPjc/486100.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486100.htmlTechArticlePHP to get the IP address of the client and server is as follows :? Php echo "(1) the IP address of the user who browses the current page is:"; echo $ _ SERVER [REMOTE_ADDR]; echo "br/"; echo "(2) browse when...