PHP 获取客户端与服务器的IP的实例代码
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:40:27
Original
980 people have browsed it
PHP 获取客户端与服务器的IP的实例代码如下:
- echo "(1)浏览当前页面的用户的 IP 地址为:";
- echo $_SERVER[REMOTE_ADDR];
- echo "
";
- echo "(2)浏览当前页面的用户的 IP 地址为:";
- echo getenv(REMOTE_ADDR);
- echo "
";
- echo "主机 www.ite5e.com 的 IP 地址为:";
- echo gethostbyname(www.baidu.com);
- ?>
-
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11