[HELP] Website teller [HELP]NOG NIET OPGELOST :(

Gestart doorDylan7 reacties26 weergaven

8 berichten · pagina 1 van 1

Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
hey
ik zoek een script die telt hoeveel bezoekers er online zijn.
Niet een die telt hoeveel er al zijn geweest!!!!

hij moet ook automaties updaten winkbye
GRAAG GEEN AFBEELDING MAAR EEN GWN LETTERTYPE
0
Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je kan ook in je database een kolom maken met: online.
Als er bij online (standaard) 0 staat, is ie offline, en als er is ingelogd word die 0 geüpdatet naar 1 waardoor je kan zien dat diegene online is.

Dan maak je een query die iedereen uit de database haalt waarbij word gekeken of de kolom online op 0 of 1 staat.

Veel succes!smile
0
Berichten
545
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR] 
 
[COLOR= #FF8000]// instellingen van de teller[/COLOR]
[COLOR= #0000BB]$sinds[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"1 September 2004"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// vul hier de datum in, van wanneer de teller telt[/COLOR]
[COLOR= #0000BB]$bestand[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"teller.txt"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// vul hier de bestandsnaam in, van de logfile
 
// controleren of bestand bestaat[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/file_exists"]file_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bestand[/COLOR][COLOR= #007700])) {[/COLOR]
    [COLOR= #FF8000]// het bestand bestaat, waarde + 1[/COLOR]
    [COLOR= #0000BB]$actie[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bestand[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"r+"[/COLOR][COLOR= #007700]);[/COLOR] 
    [COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fgets"]fgets[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actie[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]6[/COLOR][COLOR= #007700]);[/COLOR] 
    [COLOR= #0000BB]$aantal[/COLOR][COLOR= #007700]++;[/COLOR] 
    [URL="http://www.php.net/rewind"]rewind[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actie[/COLOR][COLOR= #007700]);[/COLOR] 
    [URL="http://www.php.net/fputs"]fputs[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actie[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$aantal[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]6[/COLOR][COLOR= #007700]);[/COLOR] 
    [URL="http://www.php.net/fclose"]fclose[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actie[/COLOR][COLOR= #007700]); 
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] 
    [COLOR= #FF8000]// het bestand bestaat niet, nieuwe aanmaken met waarde 1[/COLOR]
    [COLOR= #0000BB]$actie[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bestand[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"w"[/COLOR][COLOR= #007700]);[/COLOR] 
    [COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] 
    [URL="http://www.php.net/fputs"]fputs[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actie[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$aantal[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]6[/COLOR][COLOR= #007700]);[/COLOR] 
    [URL="http://www.php.net/fclose"]fclose[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actie[/COLOR][COLOR= #007700]); 
}[/COLOR] 
 
[COLOR= #FF8000]// tekst weergeven[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U bent bezoeker <b>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$aantal[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</b> sinds "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sinds[/COLOR][COLOR= #007700];[/COLOR]
 
?>


en dan een bestandje aanmaken met kladblok: teller.txt en in dit bestand plaats je een cijfer 0.
deze upload je allebij op je site, en tada, je teller in lettertype.
0
Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Moet er op regel 18 niet staan

$actie = fopen($bestand, "teller.txt");
0
Berichten
515
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Reinier schreef:
Moet er op regel 18 niet staan

$actie = fopen($bestand, "teller.txt");
Nee bovenaan word $bestand aangemaakt met teller.txt als inhoud.

letterlik word er dit dus gedaan
$actie = fopen(teller.txt, w)

de w zorgt voor bepaalde functies voor bestand zoals alleen schrijven of aanmaken etcetcetc
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren