Thank you for the good work. I have only a little problem with the test_http.php. I would like to use it on a url with a NTLM authentication.
For that, I have put in the code of test_http.php :
$user="myuser"; /* It's a local user on the server */
$realm="nameofserver"; /* It's local on the server */
$workstation="????"; /* I don't know if I must put the name of the client or the server ; with the FQDN or not ? */
Could you help me, because when I start the script, I have this error :
<TITLE>Test for Manuel Lemos' PHP HTTP class</TITLE>
<H1><CENTER>Test for Manuel Lemos' PHP HTTP class</CENTER></H1>
<H2><LI>Opening connection to:</H2>
Resolving HTTP server domain "myserver"...<br />
Connecting to HTTP server IP ipaddressofserver...<br />
Connected to myserver<br />
<H2><LI>Sending request for page:</H2>
C GET /perfnettest/ HTTP/1.1<br />
C Host: myserver.fqdn:81<br />
C User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)<br />
C Pragma: nocache<br />
C <br />
GET /perfnettest/ HTTP/1.1</PRE>
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
S HTTP/1.1 401 Unauthorized<br />
S Content-Length: 1656<br />
S Content-Type: text/html<br />
S Server: Microsoft-IIS/6.0<br />
S WWW-Authenticate: Negotiate<br />
S WWW-Authenticate: NTLM<br />
S Date: Mon, 24 Oct 2005 12:43:52 GMT<br />
S <br />
Disconnected from myserver.fqdn<br />
<CENTER><H2>Error: authentication error: authentication mechanism NTLM may not be used: the requested credential user is not defined</H2><CENTER>
Guilleaume Valery - 2005-10-25 12:10:26 - In reply to message 2 from Manuel Lemos
For a NTLM authentication I must also use this type of authentication http://user:password@domain/page ? I thinked that I must fill (in your example test_http.php) the fields : $user="myuser";$password="mypassword";$realm="nameofserver";$workstation="????";
And it will be ok with that.
My script is very like your exemple. For the moment, I only try to do a connection on a web page with NTLM credentials.
Manuel Lemos - 2006-01-30 19:50:41 - In reply to message 5 from Cyril GIRONDE
You cannot disable the NTLM authentication without changing the SASL library. What you can do is to tell the HTTP class that you want to give priority to some other authentication method, setting the authentication_mechanism .
However, I suspect that it is your server that is requiring NTLM authentication and you may not be able to access without authenticating with NTLM.