Joined: 24 Apr 2004 Posts: 890 Location: .....ni na nebu, ni na zemlji.....
Posted: 26.09.2004 11:44 Post subject: brojač posjeta u PHPu
pa zahtjevu klijenta sam išo radit jedan jednostavan brojač, nisam htio radit ništa s bazom da ne kompliciram, ali htio bih čuti vaše mišljenje o tome kak je ovo napravljeno.
također, ako se ovdašnji PHP gurui slože da valja, kome god treba nek ga slobodno koristi.
dakle...
prije headera ide ::
Code:
<?php
session_start ();
header("Cache-control: private");
include ( "brojac.php" );
?>
echo '<br><br>';
echo 'Prosječan broj stranica koje posjetitelj pregleda : <b>', ($ukupno + $sveukupno)/$ukupno,'</b></p>';
?>
eto. kritike su dobrodošle, ovo je napravljeno na brzinu u nedelju ujutro, pa ono...
hehe....
volio bi čuti kaj mislite.
i naravno, u folderu treba imate dvije .txt datoteke :
ukupno.txt
sveukupno.txt
_________________ This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Joined: 24 Apr 2004 Posts: 890 Location: .....ni na nebu, ni na zemlji.....
Posted: 26.09.2004 18:11 Post subject:
blah...radi lokalno...nije baš oduševljen s radom na serveru.
javim kad sredim, za sad je tek nacrt
ajmo PHP gurui...kaj ne valja?
_________________ This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
_________________ This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Ovo je samo kaj sam vidio nabrzaka... Nemam vremena testirat u zivo, ali ako sredis ovo gore kaj sam napisao, mozda ce i malo brze raditi... Nemam pojma...
Joined: 24 Apr 2004 Posts: 890 Location: .....ni na nebu, ni na zemlji.....
Posted: 26.09.2004 22:34 Post subject:
zato sam i postao...
dakle ne moram session_register() uopće?
mogu samo $_SESSION['spoji'] = true; ?
kad sam čitao tutoriale za sessione bilo je obavezno session_register().
idem probat ))
_________________ This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum