Dylanh schreef:Die 3 in je fsock zorgt ervoor dat de connectie voor 3 seconden lang open blijft volgens mij, en hij dan pas stopt met kijken of de server offline is. Dit wil zeggen dat het PHP script al minstens 3 seconden moet laden.Nee, dat controleert ie per minuut:Eerdere citaten tonen
Nickjexx schreef:Quote:Eerdere citaten tonen
Dylanh schreef:OhEerdere citaten tonen
Rik schreef:Nou, als je bagger programmeert dan werkt je site ook bagger., naja dan ik ga toch over op een andere server (hier)
Server info Server is offline!
Probeer het later nog eens!
Laatste update: 16-08-2012 13:34
Moet hij bij elke pagina view checken of de server offline is? Zoja doe het met een cronjob[COLOR= #0000BB]<?php[/COLOR] [COLOR= #FF8000]## Status cache ###[/COLOR] [COLOR= #0000BB]$site[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"xxx"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$port[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"25565"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$fp[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/fsockopen"]fsockopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$site[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$port[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$errno[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$errstr[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]3[/COLOR][COLOR= #007700]);[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$fp[/COLOR][COLOR= #007700]) {[/COLOR] [COLOR= #0000BB]$online[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]0[/COLOR][COLOR= #007700]; }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] [COLOR= #0000BB]$online[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]; }[/COLOR] [COLOR= #0000BB]$date[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM status"[/COLOR][COLOR= #007700]));[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$date[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]last[/COLOR][COLOR= #007700]] !=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]d-m-Y H:i[/COLOR][COLOR= #007700])) {[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE status SET last = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]d-m-Y H:i[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]", online_users = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$server[/COLOR][COLOR= #007700]->[/COLOR]online_players[COLOR= #007700].[/COLOR][COLOR= #DD0000]"/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$server[/COLOR][COLOR= #007700]->[/COLOR]max_players[COLOR= #007700].[/COLOR][COLOR= #DD0000]", status = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$online[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]); }[/COLOR] [COLOR= #FF8000]### eind ###[/COLOR] ?>
Dat soort dingen helpen dus mee aan de hoge laadtijd.
, naja dan ik ga toch over op een andere server (hier)


