Счетчик просмотров!
-
окей)
-

-
вуо
-
Всем привет

-
В закладки.

-
Прикольно что я данные от сайта забыл, теперь проект будет работать, пока хостинг меня не отключит

-
[url=foreach ($fds as $key => $value){ ]Название ссылки[/url]
Добавлено через 00:49 мин.
http://telonko.guru-hosting.ru/img/txt/r-top10.pngДобавлено через 00:57 мин.
Название ссылки -
Зб
-

-
[iмg]http://telonko.guru-hosting.ru/img/image.png[/iмg].
Добавлено через 07:19 мин.
http://telonko.ru/forum/topic368770 -
очень хорошее разришение спасибо
-
Типа скрытый ап

-
во ***ня....
-
<?
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);
?>