<?php
function serviceStatus(66.232.109.231, $port) {
$handle = @fsockopen($ip, $port, $errno, $errstr, 30);
if (!$handle) {
$string = 'Down';
} else {
$string = 'Online';
@fclose($handle);
}
return $string;
}
echo $string;
?>
Parse error: syntax error, unexpected T_DNUMBER, expecting '&' or T_VARIABLE in /home/fedlerne/public_html/x10/includes/status.php on line 3
<?php
function serviceStatus($ip = "66.232.109.231", $port = 80){
$handle = @fsockopen($ip, $port, $errno, $errstr, 30);
if (!$handle) {
$string = 'Down';
} else {
$string = 'Online';
@fclose($handle);
}
return $string;
}
echo serviceStatus();
?>
echo serviceStatus("123.123.123.123",8080);