Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $number = htmlentities(stripslashes($_GET['icq']), ENT_QUOTES, "UTF-8");
- $nicksize = strlen($number) * 15;
- header("Content-type: image/png");
- $im = imagecreate($nicksize, 25);
- $background_color = imagecolorallocate($im, 255, 255, 255);
- $text_color = imagecolorallocate($im, 0, 0, 0);
- $fp = fsockopen("status.icq.com", 80, $errno, $errstr, 30);
- if ($fp)
- {
- fputs($fp, "GET /online.gif?icq=$number&img=5 HTTP/1.0\r\nHost: status.icq.com\r\n\r\n");
- while (!feof($fp))
- {
- $str = fgets($fp,128);
- if (($pos = strpos($str, "Location")) !== false)
- {
- $atim = imagecreatefromgif("http://status.icq.com/".substr($str, $pos + 10));
- imagecopy($im, $atim, 0, 5, 0, 0, 16, 16);
- }
- }
- fclose ($fp);
- }
- imagettftext($im, 10, 0, 25, 18, $text_color, "fonts/Day.otf", $number);
- imagepng($im);
- imagedestroy($im);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment