public __construct ( string $ip, string $port = "9100" ) | ||
$ip | string | IP address or hostname to use. |
$port | string | The port number to connect on. |
public function __construct($ip, $port = "9100")
{
$this->fp = @fsockopen($ip, $port, $errno, $errstr);
if ($this->fp === false) {
throw new Exception("Cannot initialise NetworkPrintConnector: " . $errstr);
}
}