maybe just do a loop for a certain amount
like 40 pings (40 loops)
<?
$a = 1;
while ( $a <= 40 ) {
$sum += $a;
echo "test<br>";
$a++;
}
?>
cause doing it more than really 10 sounds like your trying to create a ping flooder
humm having a script ping yourself will put alot of stress on the server also when you get heavy load, this is not the best way.
Id just create a login system and have the login system set you set ONLINE in a database then when you logoff have it set to OFFLINE.
Then just right a script were if the user just closes the browser have it change it to offline after a certain time