Home > php教程 > php手册 > PHP获取访客IP地址的六种方法

PHP获取访客IP地址的六种方法

WBOY
Release: 2016-06-06 20:10:51
Original
1201 people have browsed it

方法一:?phpfunctionGetIP(){if(!empty($_SERVER["HTTP_CLIENT_IP"])){$cip=$_SERVER["HTTP_CLIENT_IP"];}elseif(!empty($_SERVER["HTTP_X_FORWARDED_FOR"])){$cip=$_SERVER["HTTP_X_FORWARDED_FOR"];}elseif(!empty($_SERVER["REMOTE_ADDR"])){$cip=$_SERV

方法一: 方法二: 方法三: 方法四: 方法五: 方法六:
Related labels:
source:php.cn
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template