[PHP]<?php
// Ganti header jd jpeg
header("Content-type: image/jpeg");
/** Random*/
$number = rand(1,9);
if($number==1)$string2 = "My Web: www.cipika-cipiki.com";
if($number==2)$string2 = "FS: www.friendster.com/kiluadeath";
if($number==3)$string2 = "Email: [email protected]";
if($number==4)$string2 = "Love is Hurt";
if($number==5)$string2 = "aLwaYs LuPh KaSh";
if($number==6)$string2 = "Don't LiE to ur self";
if($number==7)$string2 = "Jangan katakan apa yg tdk pernah engkau perbuat";
if($number==8)$string2 = "Qw hanyalah seonggok daging di dunia ini";
if($number==9)$string2 = "FS: [email protected]";
/** BUAT CEK IP */
$ip = $_SERVER["REMOTE_ADDR"] ;
// Random background
// menentukan waktu acak
srand ((float) microtime() * 10000000);
// tuliskan nama-nama file background Anda, tanpa ekstensi file.
$input = array ("sig2", "sig");
// mengacak urutan background yang tampil
$rand_keys = array_rand ($input, 2);
// memasukkan hasil acak ke variable $pic
$pic= $input[$rand_keys[0]];
// sesuaikan path file Anda
$im = imageCreateFromJpeg("http://www.cipika-cipiki.com/$pic.jpg");
// counter
$viewss = file("views.txt");
$views = $viewss[0]; $views++;
$fp = fopen("views.txt", "w");
fwrite($fp, $views);
fclose($fp);
//browser
$kasaya = $_SERVER['HTTP_USER_AGENT'];
$agent = $kasaya;
if ( strstr($agent, "MSIE 5") ) $browser = "using IE 5";
elseif ( strstr($agent, "MSIE 6") ) $browser = "using IE 6";
elseif ( strstr($agent, "MSIE 4") ) $browser = "using IE 4";
elseif ( strstr($agent, "Firebird") ) $browser = "using Firebird";
elseif ( strstr($agent, "Safari") ) $browser = "using Safari";
elseif ( strstr($agent, "Mozilla/5") ) $browser = "using Mozilla/Netscape 5";
elseif ( strstr($agent, "Mozilla/6") ) $browser = "using Netscape 6";
elseif ( strstr($agent, "Mozilla/4") ) $browser = "using Netscape 4";
elseif ( strstr($agent, "Opera") ) $browser = "using Opera";
else $browser = "";
// Simple OS Detection
$kash = $_SERVER['HTTP_USER_AGENT'];
$os = $kash;
$oslist = Array (
// Windows
"Win|Windows",
"Win16|Windows",
"Win95|Windows 95",
"Win98|Windows 98",
"WinME|Windows ME",
"Win32|Windows",
"WinNT|Windows NT",
"Windows 3.1|Windows 3.1",
"Windows 95|Windows 95",
"Windows CE|Windows CE",
"Windows 98|Windows 98",
"Windows ME|Windows ME",
"Windows NT|Windows NT",
"Windows NT 5.0|Windows 2000",
"Windows NT 5.1|Windows XP",
// Macintosh
"Mac_68000|MacOS m68K",
"Mac_68K|MacOS m68K",
"Mac_PowerPC|MacOS PPC",
"Mac_PPC|MacOS PPC",
"Macintosh|MacOS",
// Unices
"X11|UNIX",
"BSD|BSD",
"SunOS|SunOS",
"IRIX|IRIX",
"HP-UX|HP-UX",
"AIX|AIX",
"QNX|QNX",
"SCO_SV|SCO UNIX",
"FreeBSD|FreeBSD",
"NetBSD|NetBSD",
// Linux
"Linux|Linux",
"Debian|Debian GNU/Linux",
// Other
"BeOS|BeOS",
"OS/2|OS/2",
"AmigaOS|AmigaOS",
);
foreach ($oslist as $osnow) {
$osnow = explode ("|", $osnow);
if (eregi ($osnow[0], $os)) {
$endos = $osnow[1];
$check = "No";
} elseif ($check != "No") {
$endos = "Unknown";
}
}
/**
Sets bermacam color atau warna tulisan dalam RGB format.
*/
$color = imagecolorallocate($im, 255, 255, 0);
$color1 = imagecolorallocate($im, 0, 255, 255);
$color2 = imagecolorallocate($im, 255, 255, 255);
$color3 = imagecolorallocate($im, 255, 0, 0);
$color4 = imagecolorallocate($im, 255, 255, 255);
// Sets posisi images dalam satuan pixels.
$px=10;
$py=10;
// Menampilkan tulisan berdasarkan variables dan posisi x (horizontal)
// Dan y (vertikal) dalam satuan pixels yg bisa set oleh variables px dan py diatas
imagestring($im, 2, $px, $py+70, "Browser Kamu : $browser", $color);
imagestring($im, 2, $px, $py+60, "IP Kamu: $ip", $color4);
/** Untuk random text **/
imagestring($im, 4, $px, $qy+50, $string2, $color3);
/** COunter **/
imagestring($im, 2, $px, $qy+90, "Sig ini telah dilihat $views kali!", $color1);
/** OS **/
imagestring($im, 2, $px, $qy+100, "OS Kamu: $endos", $color2);
// Penampakan bpada images JPG sebagai background dan selesai!
imagejpeg($im);
imagedestroy($im);
?> [/PHP]
Share This Thread