timeout parameter of fsockopen function not working?
Posted: Mon Nov 30, 2009 2:48 am
Hi
Here is my code :
<?php
$status=0;
if(isset($_GET['host']) && isset($_GET['port'])){
try{
$fp = @fsockopen ($_GET['host'], $_GET['port'], $errno, $errstr, 5);
if ($fp) {
$status=1;
fclose($fp);
}
}
catch(Exception $ex){
}
}
echo $status;
?>
Here the timeout parameter is not working.
Anybody please help me in this.
Regards
Rahesh
Here is my code :
<?php
$status=0;
if(isset($_GET['host']) && isset($_GET['port'])){
try{
$fp = @fsockopen ($_GET['host'], $_GET['port'], $errno, $errstr, 5);
if ($fp) {
$status=1;
fclose($fp);
}
}
catch(Exception $ex){
}
}
echo $status;
?>
Here the timeout parameter is not working.
Anybody please help me in this.
Regards
Rahesh