connection_status()

It returns the current connection status

Example

<?php
echo connection_status ();
?>

It returns one of the follows

0 – CONNECTION_NORMAL – connection is running normally
1 – CONNECTION_ABORTED – connection is aborted by user or network error
2 РCONNECTION_TIMEOUT Р connection timed out
3 – CONNECTION_ABORTED & CONNECTION_TIMEOUT

Share