Hi All
The script below keeps crashing php/apache with the following error
[Thu Apr 13 17:08:24 2006] [error] [client 127.0.0.1] Premature end of script headers: php.exe, referer: http://localhost
taken from apache error.log
<?
function getPrinter($HPLaser) {
$host = 'SERVER1.local';
global $REMOTE_ADDR;
#$host = getHostByAddr($REMOTE_ADDR);
return "\\\\".$host."\\".$HPLaser;
}
$handle = printer_open(getPrinter("HPLaser"));
if(!$handle)
{
echo "ERROR PRINTER NOT FOUND";
} else {
echo "PRINTER FOUND AND READY TO ROCK N ROLL";
}
// Get a file into a string. In this example we'll go through HTTP to get
// the HTML source of a URL.
$lines = file_get_contents('http://intranet/man01gen.htm');
$print01 = "";
printer_write($handle, $lines);
printer_close($handle);
?>
Ive tried to debug the code, but it keeps crashing on this line,
$lines = file_get_contents('http://intranet/man01gen.htm');
Can anyone tell me what im doing wrong..
thanks very much for reading
lozza1978