Hi group.
I've got Basic Authentication working almost fine, so I need to resolve a
little problem.
I've got this code in my php scrip:
<?php
$fp = fsockopen("www. mydomain.com",8 0);
fputs($fp,"GET /downloads HTTP/1.0\r\n");
fputs($fp,"Host : www.mydomain.co m\r\n");
fputs($fp,"Auth orization: Basic " . base64_encode(" user:pass") . "\r\n\
\n");
fpassthru($fp);
?>
This works almost fine.
I say almost because I can't stop showing the server response string from my
page:
"HTTP/1.1 200 OK Date: Fri, 23 Jul 2004 17:37:40 GMT Server: Apache/1.3.31
(Unix) PHP/4.3.6 Connection: close Content-Type: text/html"
How can I stop showing this text from in my page?
Best regards,
Nuno Paquete.
I've got Basic Authentication working almost fine, so I need to resolve a
little problem.
I've got this code in my php scrip:
<?php
$fp = fsockopen("www. mydomain.com",8 0);
fputs($fp,"GET /downloads HTTP/1.0\r\n");
fputs($fp,"Host : www.mydomain.co m\r\n");
fputs($fp,"Auth orization: Basic " . base64_encode(" user:pass") . "\r\n\
\n");
fpassthru($fp);
?>
This works almost fine.
I say almost because I can't stop showing the server response string from my
page:
"HTTP/1.1 200 OK Date: Fri, 23 Jul 2004 17:37:40 GMT Server: Apache/1.3.31
(Unix) PHP/4.3.6 Connection: close Content-Type: text/html"
How can I stop showing this text from in my page?
Best regards,
Nuno Paquete.
Comment