hi i want to ask...how can i break the connection of user to internet used php script...... thanks
A:
And why the ruby tag? :)
Php is a server-side language, if you need to perform client-side actions you need to use a client-side language. Javascript or VBScript to name a few.
Romain Deveaud
2010-06-28 14:32:26
+1
A:
Take a look at Connection Handling!
http://www.php.net/manual/en/features.connection-handling.php
if(connection_status() == 1 || connection_status == 2) // Timeout or Abort
{
//Skip the DB shizzle
}else
{
$DB->inserter->user('john','doe','password');
}
RobertPitt
2010-06-28 14:57:14
...interesting. Thanks for the reference. But note that it only comes into play if `ignore_user_abort` is enabled, and that it's just for polling the status, not changing it.
grossvogel
2010-08-15 00:44:29
why would you want to change the status if the user has disconnected, theres no point in forcing content out if the user is no longer connected!
RobertPitt
2010-08-16 14:56:31
A:
Are you looking for exit()? This will stop script execution. The server will finish up the response, and the connection will be closed.
grossvogel
2010-08-15 00:46:52