Location: PHPKode > scripts > My Banners > my-banners/English/baner.php
<?php
/***********************************************************************/
/* Statistika praæenja broja prikazivanja bannera na tuðim stranicama  */
/*                                                                     */
/* Copyright (c) 2002 by Hrvoje Novosel (hide@address.com)     */
/* http://www.crovortex.com                                            */
/***********************************************************************/
include("config.php");
function impresija($ids) {
global $tabela, $imgURL;
mysql_query("update $tabela set impresija=impresija+1 where ids=$ids");
$fh = fopen($imgURL,'rb');
$data = '';
while( $buffer = fread($fh,4096) )
{
$data .= $buffer;
}
fclose($fh);
echo "$data";
}

function klik($ids) {
global $tabela;
mysql_query("update $tabela set klikova=klikova+1 where ids=$ids");
Header("Location: index.php");
}

switch($op) {
  default:
    die("Neispravan pristup");
    break;
  case "prikaz":
    if ($ids) { impresija($ids); } 
    break;
  case "klik":
    if ($ids) { klik($ids); } else { die("Neispravan link, kontaktirajte administratora!"); }
    break;
}

?>
Return current item: My Banners