<?php
function control_socket($host, $port) {
$this->hostname = $host;
$this->portnumb = $port;
$this->contsock = fsockopen($this->hostname, $this->portnumb) or exit('offline');
if ( $this->contsock ) {
echo "online";
}
}
?>
Burde virke... har ikke testet
mvh gustav olsen