Ip signature probe. You can use it as a signature. The PHP code of the forum avatar :--------------------------------------------------------------------------------? Php *************************************** * *********** you can use as a signature, forum Avatar
PHP code :--------------------------------------------------------------------------------
/*************************************** *************
How to create an ip signature probe --- stormor@163.com
If any display is incorrect, send an email to me for modification!
**************************************** *************/
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 );
$ Fontcolor = ImageColorAllocate ($ picture, 0, 0 );
Imageline ($ picture, 0, 0, $ width-1, 0, $ bordercolor );
Imageline ($ picture, 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, 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 );
$ Fontcolor = ImageColorAllocate ($ picture, 0, 0 );
Imageline ($ picture, 0, 0, $ width-1, 0, $ bordercolor );
Imageline ($ picture, 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 );
Imageline ($ picture, $ width-1, $ middle-1, 0, $ middle-1, $ bordercolor );
Imagestring ($ picture, 2, 0, $ wenzi1, $ fontcolor );
Imagestring ($ picture, 2, $ left + 2, 0, $ ip_real, $ fontcolor );
Imagestring ($ picture, 2, 2, $ middle, $ wenzi2, $ fontcolor );
Imagestring ($ picture, 2, $ left + 2, $ middle, $ ip_agent, $ fontcolor );
Imagepng ($ picture );
ImageDestroy ($ picture );
}
?>
--------------------------------------------------------------------------------
Authorization PHP code :--------------------------------------------------------------------------------? Php /************************************** *************...