Php: how to display the server IP address, port, and client IP address _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Php displays the server IP address, port, and client IP address. 01? Php02echo current page server ip address:; 03 echo $ _ SERVER [SERVER_ADDR]; 04 echobr; 05echo current client IP address:; 06 echo $ _ SERVER [REMOTE_ADDR]; 07 echobr; 01

02 echo "the current page server IP address is :";

03 echo $ _ SERVER ["SERVER_ADDR"];

04 echo"
";

05 echo "current client IP address :";

06 echo $ _ SERVER ["REMOTE_ADDR"];

07 echo"
"; Www.2cto.com

08 echo "current port :";

09 echo $ _ SERVER ["SERVER_PORT"];

10?>

Http://www.bkjia.com/PHPjc/478043.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478043.htmlTechArticle01? Php 02 echo current page server ip address:; 03 echo $ _ SERVER [SERVER_ADDR]; 04 echo br/; 05 echo current client IP address :; 06 echo $ _ SERVER [REMOTE_ADDR]; 07 echo br /;...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.