function nums_from($from, $to, $s) {
static $x = 0;
echo ( $from + $x ).' ' ;
$x = $from;
if ($from < $to){
nums_from($from + $s, $to, $s );
}
}
nums_from(1, 10, 2);
ideone.com/WyOXJx $host = '193.33.186.70';
$port = 80;
$waitTimeoutInSeconds = 1;
if($fp = fsockopen($host,$port,$errCode,$errStr,$waitTimeoutInSeconds)){
// It worked
} else {
// It didn't work
}
fclose($fp);