Gasten

Gestart doorShahiem7 reacties55 weergaven

8 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een online script en daar wil ik de gasten die me site bezoeken op weergeven, maar hoe doe je dat?
Kan iemand me daar bij helpen?

Bedankt smile
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bump
0
Berichten
46
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Post je huidige statistiekenscript is.
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dit is hem:
Krijg ik er ook een sql bij?

[COLOR= #0000BB]<?php
$q[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT COUNT(1) AS onlinecount FROM member_accounts WHERE DATE_ADD(uLast, INTERVAL 150 SECOND) > NOW() AND uOnline = 1"[/COLOR][COLOR= #007700]))[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [COLOR= #0000BB]$rows[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$q[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onlinecount[/COLOR][COLOR= #007700]];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<h1>Online leden</h1>[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Er [/COLOR] [COLOR= #007700]. ([/COLOR][COLOR= #0000BB]$rows[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #DD0000]is [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$rows[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] bewoner[/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]zijn [/COLOR] [COLOR= #007700]. ([/COLOR][COLOR= #0000BB]$rows[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #DD0000]geen[/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #0000BB]$rows[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] bewoners[/COLOR][COLOR= #007700]) .[/COLOR]  [COLOR= #DD0000] actief.<br />[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$online_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `uId`, `uName`, `uCol`, `uLast` FROM `member_accounts` WHERE DATE_ADD(uLast, INTERVAL 150 SECOND) > NOW() AND uOnline = 1 ORDER BY `uLast` DESC"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$online_query[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<table><tr><td><strong>Gebruikersnaam</strong></td><td><strong>Laatst gezien:</strong></td></tr>[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$online[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$online_query[/COLOR][COLOR= #007700]))
        {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<tr><td style="width: 150px;"><a href="index.php?p=profiel&amp;id=[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$online[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"><span style="color:[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$online[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCol[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000];font-weight: bold;width: 150px;">[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$online[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]</span></a></td><td>[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$online[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uLast[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]</td></tr>[/COLOR][COLOR= #007700];
        }[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</table>[/COLOR][COLOR= #007700];
    }[/COLOR]
?>
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sla het ip-adres op.
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe doe je dat?
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
klik
0
Krm

Lid

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hiermee $_SERVER[REMOTE_ADDR];
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