教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 ip签名探针

ip签名探针

发布时间:2016-10-27   编辑:jiaochengji.com
教程集为您提供ip签名探针等资源,欢迎您收藏本站,我们将为您提供最新的ip签名探针资源
可以用做签名,论坛头像
PHP代码:--------------------------------------------------------------------------------
<?php
/****************************************************
残风制作ip签名探针---stormor@163.com
如果有显示不正确的地方请发E-mail给我,以便修改!
*****************************************************/
Header("Content-type: image/png");
if(getenv("HTTP_CLIENT_IP")) {
$ip = getenv("HTTP_CLIENT_IP");
$ip_agent = getenv("REMOTE_ADDR");
} elseif(getenv("HTTP_X_FORWARDED_FOR")) {
$ip_real = getenv("HTTP_X_FORWARDED_FOR");
$ip_agent = getenv("REMOTE_ADDR");
} else {
$ip_real = getenv("REMOTE_ADDR");
$ip_agent = "";
}
if(!$ip_agent){
$wenzi="IP:";
$ip_count=strlen($ip_real);
$left=22;
$width=$ip_count*6 $left 5;
$height=14;
$picture=Imagecreate($width,$height);
$bgcolor=ImageColorAllocate($picture,225,250,225);
$bordercolor=ImageColorAllocate($picture,0,0,0);
$fontcolor=ImageColorAllocate($picture,0,0,0);
Imageline($picture,0,0,$width-1,0,$bordercolor);
Imageline($picture,0,0,0,$height-1,$bordercolor);
Imageline($picture,$width-1,$height-1,$width-1,0,$bordercolor);
Imageline($picture,$width-1,$height-1,0,$height-1,$bordercolor);
Imagestring($picture,2,2,0,$wenzi,$fontcolor);
Imagestring($picture,2,$left 2,0,$ip_real,$fontcolor);
Imagepng($picture);
ImageDestroy($picture);
}else{
$wenzi1="IP1:";
$wenzi2="IP2:";
$ip_count1=strlen($ip_real);
$ip_count2=strlen($ip_agent);
$left=26;
if($ip_count1>=$ip_count2){$width=$ip_count1*6 $left 5;}else{$width=$ip_count2*6 $left 5;}
$height=29;
$middle=$height/2 1;
$picture=Imagecreate($width,$height);
$bgcolor=ImageColorAllocate($picture,225,250,225);
$bordercolor=ImageColorAllocate($picture,0,0,0);

您可能感兴趣的文章:
ip签名探针
什么是php探针
php 实现dns域名查询的方法详解(图文)
php函数获取在线ip与客户端ip
php探针 phpinfo()函数禁用时使用
搜索引擎优化SEO全攻略
Linux服务器查看PHP是否支持mail()函数方法
php服务器探针显示php服务器信息
Linux服务器查看 PHP 是否支持mail()函数方法
php探针不显示cpu、内存、硬盘信息原因分析

[关闭]
~ ~