Счетчик просмотров!
-
прикольно
-

Добавлено через 00:13 мин.
как делать знаешь?Добавлено через 02:09 мин.
preg_match_all("/telonko.ru/forum/topic(.*?)?/i",$_SERVER['HTTP_REFERER'].'?',$matches); $topic = $matches[1][0];Добавлено через 02:25 мин.
preg_match_all("/telonko.ru\/forum\/topic(.*?)\?/i",$_SERVER['HTTP_REFERER'].'?',$matches); $topic = $matches[1][0]; -
Кому хочется посмеяться над кодом

<? if($_GET['top'] == ''){die("Exit");} $mask = "*.txt"; foreach(glob($mask ) as $filename){ if(strlen($filename) < 32){ $str = file_get_contents($filename); if($str != '0'){ $count[str_replace('.txt','',$filename)] = $str;}}} arsort($count); $resultat = explode('top',$_GET['top']); $_GET['top'] = $resultat[1]; $resultat = explode('.png', $_GET['top']); $resultat = $resultat[0]; $resultat = intval($resultat); if($resultat != ''){ $fds = $count; unset($count); $f = 0; foreach ($fds as $key => $value){ if($f < $resultat) $count[$key] = $value; $f++;}} $font = 'AGPRESB.ttf'; $fontsize = 10; $angle = 0; $height = 0; foreach ($count as $key => $value){ $w[$key] = 'Topic'.$key.' - '.$value.' просмотров'; $tex = imagettfbbox($fontsize,$angle,$font,$w[$key]); $sd[$key] = $tex; $text[$key] = $tex[2]; $height = $height + 16;} arsort($text); foreach ($text as $key => $value){ if($s == ''){$s=$value+4;}} header('Content-type: image/png'); $im = imagecreatetruecolor($s, $height); imagesavealpha($im,false); $bg = imagecolorallocate($im,255,255,255); imagefill($im,0,0,$bg); putenv('GDFONTPATH='. realpath('.')); $y = 12; foreach ($count as $key => $value){ $text_x = $s - $text[$key]; $text_x = $text_x / 2; $text_y = $y; switch ($_GET['color']){ case 'r':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,255,0,0), $font, $w[$key]);break; case 'g':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,255,0), $font, $w[$key]);break; case 'b':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,255), $font, $w[$key]);break; case '0':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,0), $font, $w[$key]);break; default:imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,0), $font, $w[$key]);break;}; $y=$y+16;} imagepng($im); imagedestroy($im); ?> -

-

-

Добавлено через 00:30 мин.
<? if($_GET['top'] == ''){die("Exit");} $mask = "*.txt"; foreach(glob($mask ) as $filename){ if(strlen($filename) < 32){ $str = file_get_contents($filename); if($str != '0'){ $count[str_replace('.txt','',$filename)] = $str;}}} arsort($count); $resultat = explode('top',$_GET['top']); $_GET['top'] = $resultat[1]; $resultat = explode('.png', $_GET['top']); $resultat = $resultat[0]; $resultat = intval($resultat); if($resultat != ''){ $fds = $count; unset($count); $f = 0; foreach ($fds as $key => $value){ if($f < $resultat) $count[$key] = $value; $f++;}} $font = 'AGPRESB.ttf'; $fontsize = 10; $angle = 0; $height = 0; foreach ($count as $key => $value){ $w[$key] = 'Topic'.$key.' - '.$value.' просмотров'; $tex = imagettfbbox($fontsize,$angle,$font,$w[$key]); $sd[$key] = $tex; $text[$key] = $tex[2]; $height = $height + 16;} arsort($text); foreach ($text as $key => $value){ if($s == ''){$s=$value+4;}} header('Content-type: image/png'); $im = imagecreatetruecolor($s, $height); imagesavealpha($im,false); $bg = imagecolorallocate($im,255,255,255); imagefill($im,0,0,$bg); putenv('GDFONTPATH='. realpath('.')); $y = 12; foreach ($count as $key => $value){ $text_x = $s - $text[$key]; $text_x = $text_x / 2; $text_y = $y; switch ($_GET['color']){ case 'r':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,255,0,0), $font, $w[$key]);break; case 'g':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,255,0), $font, $w[$key]);break; case 'b':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,255), $font, $w[$key]);break; case '0':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,0), $font, $w[$key]);break; default:imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,0), $font, $w[$key]);break;}; $y=$y+16;} imagepng($im); imagedestroy($im); ?> -
не вижу смысла вообще от этого счётчика
-
знал
-
не вижу смысла вообще от этого счётчикаНе вижу смысла твоего сообщения.
Внимание, спойлер!Так же как и своего. -
<? if($_GET['top'] == ''){die("Exit");} $mask = "*.txt"; foreach(glob($mask ) as $filename){ if(strlen($filename) < 32){ $str = file_get_contents($filename); if($str != '0'){ $count[str_replace('.txt','',$filename)] = $str;}}} arsort($count); $resultat = explode('top',$_GET['top']); $_GET['top'] = $resultat[1]; $resultat = explode('.png', $_GET['top']); $resultat = $resultat[0]; $resultat = intval($resultat); if($resultat != ''){ $fds = $count; unset($count); $f = 0; foreach ($fds as $key => $value){ if($f < $resultat) $count[$key] = $value; $f++;}} $font = 'AGPRESB.ttf'; $fontsize = 10; $angle = 0; $height = 0; foreach ($count as $key => $value){ $w[$key] = 'Topic'.$key.' - '.$value.' просмотров'; $tex = imagettfbbox($fontsize,$angle,$font,$w[$key]); $sd[$key] = $tex; $text[$key] = $tex[2]; $height = $height + 16;} arsort($text); foreach ($text as $key => $value){ if($s == ''){$s=$value+4;}} header('Content-type: image/png'); $im = imagecreatetruecolor($s, $height); imagesavealpha($im,false); $bg = imagecolorallocate($im,255,255,255); imagefill($im,0,0,$bg); putenv('GDFONTPATH='. realpath('.')); $y = 12; foreach ($count as $key => $value){ $text_x = $s - $text[$key]; $text_x = $text_x / 2; $text_y = $y; switch ($_GET['color']){ case 'r':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,255,0,0), $font, $w[$key]);break; case 'g':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,255,0), $font, $w[$key]);break; case 'b':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,255), $font, $w[$key]);break; case '0':imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,0), $font, $w[$key]);break; default:imagettftext($im,$fontsize,$angle,$text_x,$text_y,imagecolorallocate($im,0,0,0), $font, $w[$key]);break;}; $y=$y+16;} imagepng($im); imagedestroy($im); ?> -
отлично,спасибо!
-

-

-
Спасибо огромное