note 101483 added to control-structures.declare
| From: | ramamneh at gmail dot com | Date: | Sun, 19 Dec 2010 19:15:47 +0000 |
| Subject: | note 101483 added to control-structures.declare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175070@lists.php.net to get a copy of this message | ||
check loaded server connection
$connection = false;
function checkConnection( $connectionWaitingTime = 3 )
{
// check connection & time
global $time,$connection;
if( ($t = (time() - $time)) >= $waitingTime && !$connection){
echo ("<p> Server not responding for <strong>$t</strong> seconds !!
</p>");
die("Connection aborted");
}
}
register_tick_function("checkConnection");
$time = time();
declare (ticks=1)
{
while( true ){ // connecting to loaded server
}
$connection = true ;
}
----
Server IP: 69.147.83.197
Probable Submitter: 92.253.15.155
----
Manual Page -- http://www.php.net/manual/en/control-structures.declare.php
Edit -- https://master.php.net/note/edit/101483
Del: integrated -- https://master.php.net/note/delete/101483/integrated
Del: useless -- https://master.php.net/note/delete/101483/useless
Del: bad code -- https://master.php.net/note/delete/101483/bad+code
Del: spam -- https://master.php.net/note/delete/101483/spam
Del: non-english -- https://master.php.net/note/delete/101483/non-english
Del: in docs -- https://master.php.net/note/delete/101483/in+docs
Del: other reasons-- https://master.php.net/note/delete/101483
Reject -- https://master.php.net/note/reject/101483
Search -- https://master.php.net/manage/user-notes.php