PHP Code:
$counter_array = file("counter.dat");
$all = $counter_array[0]+1;
$fp = @fopen("counter.dat","wb");
@fputs($fp,$all);
@fclose($fp);
echo '
Total hits: '.$all.'
';
$counter_array = file("counter.dat");
$all = $counter_array[0]+1;
$fp = @fopen("counter.dat","wb");
@fputs($fp,$all);
@fclose($fp);
echo '
Total hits: '.$all.'
';
<?
// Image Counter Script
if(!file_exists("count.txt"))
{$counter=fopen("count.txt", "a");}
else
{$counter=fopen("count.txt", "r+");}
$aufruf=fgets($counter,100);
$aufruf=$aufruf+1;
rewind($counter);
fputs($counter,$aufruf);
fclose($counter);
$im = @ImageCreate (99, 46) //change the image size here
or die ("Kann keinen neuen GD-Bild-Stream erzeugen");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 255, 0, 0);
ImageString ($im, 2, 1, 1, "$aufruf", $text_color2);
header('Content-Type: image/GIF');
ImageGIF ($im);
?>$p = 5;
$xfile=file('test.txt');
$countfile=count($xfile);
if($npage=="")$npage="1";
echo "Tests:".$countfile."\n";
$second=($p*$npage);
$first=($p*($npage-1));
$npages=(int) ceil($countfile/$p);
if ($npage<=$npagesAND$npage>1)$gline_rew="<a href=\"$PHP_SELF?npage=".($npage-1)."\">Prev</a>";
if ($npages > 1 AND $npage<$npages) $gline_next = "<a href=\"$PHP_SELF?npage=".($npage+1)."\">Next</a> ";
for ($i = $first; $i <=*$second-1; $i++)
{
$a=explode("?",$xfile[$i]);
$test = rtrim($a[0]);
echo "$test";
}
print " ".$gline_rew." ".$gline_next."
";
<?
$htmlredirect = "http://kralj.frih.net";
$wmlredirect = "http://kralj.r8.org";
if(strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.WML") > 0){
header("Location: ".$wmlredirect);}
else{
header("Location: ".$htmlredirect);
exit;}
?>
Leave a comment: