Keresés

Részletes keresés

kgergely Creative Commons License 2001.11.21 0 0 19
Es nem tudom ki irta a forum-scriptet, de gondolkozzon el rajta, hogy jo-e az, amit csinalt!
Telenyomhatnam az oldalt javascripttel!!!! Legalabb a < betuket ne nekem kelljen atirkalni!!!

Didn't anyone ever tell you web-page hit counters were useless? They don't count number of hits, they're a waste of time, and they serve only to stroke the writer's vanity. It's better to pick a random number; they're more realistic.

Anyway, this is what you can do if you can't help yourself.


use Fcntl qw(:DEFAULT :flock);
sysopen(FH, "numfile", O_RDWR|O_CREAT) or die "can't open numfile: $!";
flock(FH, LOCK_EX) or die "can't flock numfile: $!";
$num = <FH> || 0;
seek(FH, 0, 0) or die "can't rewind numfile: $!";
truncate(FH, 0) or die "can't truncate numfile: $!";
(print FH $num+1, "\n") or die "can't write numfile: $!";
close FH or die "can't close numfile: $!";

Here's a much better web-page hit counter:


$hits = int( (time() - 850_000_000) / rand(1_000) );

If the count doesn't impress your friends, then the code might. :-)

Előzmény: kgergely (17)
kgergely Creative Commons License 2001.11.21 0 0 18
Ajanlom a weblabor linkgyujtemenyet:
http://weblabor.hu/cgi-bin/links.pl?go=show&cat=ingyenes+szamlal&page=1
Előzmény: Your DEvil (-)
kgergely Creative Commons License 2001.11.21 0 0 17
Ejnye, ha mar perl-ben irjuk, akkor irjuk jooool!

Nezd meg a perlfaq5-ot, idezem:

Didn't anyone ever tell you web-page hit counters were useless? They don't count number of hits, they're a waste of time, and they
serve only to stroke the writer's vanity. Better to pick a random number. It's more realistic.

Anyway, this is what you can do if you can't help yourself.

use Fcntl ':flock';
sysopen(FH, "numfile", O_RDWR|O_CREAT) or die "can't open numfile: $!";
flock(FH, LOCK_EX) or die "can't flock numfile: $!";
$num = || 0;
seek(FH, 0, 0) or die "can't rewind numfile: $!";
truncate(FH, 0) or die "can't truncate numfile: $!";
(print FH $num+1, "\n") or die "can't write numfile: $!";
# Perl as of 5.004 automatically flushes before unlocking
flock(FH, LOCK_UN) or die "can't flock numfile: $!";
close FH or die "can't close numfile: $!";

Here's a much better web-page hit counter:

$hits = int( (time() - 850_000_000) / rand(1_000) );

If the count doesn't impress your friends, then the code might. :-)

Előzmény: BOB (4)
motoszkal Creative Commons License 2001.11.21 0 0 16
Ajanlhatom
free.enveco.hu-t...

Vagy a MEK-en van egy szamlalo keszitesi 5let unix ala, teljesen kezdoknek is.

Előzmény: Your DEvil (-)
actionman Creative Commons License 2001.11.21 0 0 15
Azert az nem franko, hogy

a) rogzited a latogatok IP-cimet (tudtuk es beleegyezesuk nelkul)

b) amikor megnezne a joember a statisztikat, akkor
az url-ben benne van a login neve, jelszava....

ActionMan

Előzmény: reverenda (13)
Ben Nyhyl Creative Commons License 2001.11.21 0 0 14
sitemeter.com
Előzmény: Your DEvil (-)
reverenda Creative Commons License 2001.10.31 0 0 13
javasolhatom esetleg a szolgaltatasunkat.
Előzmény: Your DEvil (-)
Törölt nick Creative Commons License 2001.10.31 0 0 12
A kérdezőnek ott van a lapja :-)
Előzmény: BOB (11)
BOB Creative Commons License 2001.10.31 0 0 11
Es nekem mi kozom van a tar.hu-hoz? Nalunk lehet cgi-t futtatni, a tar.hu meg nemerdekel ;]
Előzmény: Törölt nick (8)
Törölt nick Creative Commons License 2001.10.31 0 0 10
Én? Minek? Nem nekem kell. Én csak felhívtam a figyelmet erre a nem elhanyagolható apróságra ;-)
(ettől függetlenül az ötlet nem rossz... Én is furcsán néztem, amikor egyik éjjel létrehoztam a tar-on az oldalt és még sehol senkinek nem szóltam róla, mégis 20 fölött volt másnapra a látogatók száma :-) )
Előzmény: zsowy (9)
zsowy Creative Commons License 2001.10.30 0 0 9
Keress egy ingyenes szolgáltatót, ahol lehet és tedd oda a számlálót. A jelenlegi oldalad lehet ott, ahol van.

Vagy keress rá 'free counter'-re a weben.

Esetleg megpróbálhatsz egy ingyenes statisztika szolgáltatót (pl freestat) is, úgy még több adatot is megtudhatsz a látogatókról.
Előzmény: Törölt nick (8)
Törölt nick Creative Commons License 2001.10.30 0 0 8
Csak az a gáz, hogy emlékeim szerint a tar.hu-n nem lehet CGI scripteket használni ;-)
Előzmény: BOB (4)
Solt Creative Commons License 2001.10.30 0 0 7
Én konkrétan úgy csináltam, hogy egy fájl az egyeseket, egy pedig az ezreseket számolja. A milliósra nem volt szükségem.
Előzmény: BOB (6)
BOB Creative Commons License 2001.10.30 0 0 6
Jah, ez se rossz csak amikor 100000 talalat folott jar egy oldal akkor nem biztos hogy tul helytakarekos megoldas.
Előzmény: Solt (5)
Solt Creative Commons License 2001.10.29 0 0 5
Ez a megnyitom, kiolvasom, növelem, visszaírom sokszor vezet lenullázáshoz, és elég lassú is.
Én 1 bájtot szoktam a számláló-fájl végére érni, és stat-tal megnézem a méretét.
Előzmény: BOB (4)
BOB Creative Commons License 2001.10.29 0 0 4

#!/usr/bin/perl
print "Content-Type: text/html\n\n";
open (READ, "<count.dat") or die ("Error opening file");
$szaml=<READ>
close (READ) or die ("Error closing file");
$szaml++;
print "Ön az oldal $szaml\. látogatója\.";
open (IR,">szam.dat") or die ("Error opening file");
print IR $szaml;
close(IR) or die ("Error closing file");

Ez egy CGI script ami ezt csinalja. :)

Előzmény: Your DEvil (-)
Your DEvil Creative Commons License 2001.01.20 0 0 2
Köszi.
Előzmény: Recska (1)
Recska Creative Commons License 2001.01.20 0 0 1
Amugy probalj meg rakeresni pl altavista-n a "free web counter" szavakra, aztan hajra :)))
Recska Creative Commons License 2001.01.20 0 0 0
Honnan induljon a szamlalo? 0-rol?::))))
Your DEvil Creative Commons License 2001.01.20 0 0 topiknyitó
Hello kedves Linuxosok! Aki tud kérem segítsen! Számláló kéne a weboldalamra, mert szerintem a tár.hu átver! Nem létezik, hogy a 3 napja feltett oldamamat már 600 an látták volna, csak 2 helyen hirdettem meg. Én lennék ekkora király, hogy ilyen oldalt csinálok?:)))) Na ezt azért nem hiszem.

Szoval, kérlek irjátok le honnan lehet számlálót szerezni és hogy kell felrakni a lapra. Köszi.

Ha kedveled azért, ha nem azért nyomj egy lájkot a Fórumért!