代码:ip.php
复制内容到剪贴板代码:
<
Header("Content-type: image/png");
$img = ImageCreate(320,16);
$ip = $_SERVER['REMOTE_ADDR'];
ImageColorTransparent($img,$bgcolor);
$bgColor = ImageColorAllocate($img, 0xF0,0xF0,0xF0); // 背景颜色
$shadow = ImageColorAllocate($img, 250,0,0);// 阴影颜色
$textColor = ImageColorAllocate($img, 250,0,0);// 字体颜色
##ImageTTFText($img,10,0,65,12,$shadow,"c:/windows/fonts/Tahoma.ttf",$ip); //显示IP背景
ImageTTFText($img,10,0,2,11,$textColor,"c:/windows/fonts/Tahoma.ttf","Powered by: SFers.Cn !Your ip is: ".$ip); // 显示IP
ImagePng($img);
imagecreatefrompng($img);
ImageDestroy($img);
?>
复制内容到剪贴板代码: