php实现图形显示Ip地址的代码及注释
使用图形显示Ip,文件 sunip.php 复制代码 代码如下:<?php header(“Content-type: image/gif”); $im = imagecreate(130,15); $background_color = ImageColorAllocate ($im, 255, 255, 255); unset($ip); if($_SERVER[‘HTTP_CLIENT_IP’]){ $ip=$_SERVER[‘HTTP_CLIENT_IP’]; } else if($_SERVER[‘HTTP_X_FORWARDED_FOR’]){ $ip=$_SERVER[‘