PHP HTTP protocol client is a PHP class for making HTTP requests. It can establish connections via SOCKS or proxy servers and establish secure connections (HTTPS) with optional SSL client certificates. It supports HTTP Basic, HTTP Digest, and NTLM (Windows or Samba) authentication mechanisms. It submits POST requests with user-defined form values, file uploading, or with user-defined request bodies. It handles cookies and automatic redirection handling. There is an addon class that logs in to Yahoo! and executes actions on behalf of the user, like exporting the address book or sending invitations to Yahoo! groups.
| Tags | Internet Web Software Development Libraries php classes |
|---|---|
| Licenses | BSD Original |
| Operating Systems | OS Independent |
| Implementation | PHP |
Recent releases


Release Notes: This release fixes the HTTP POST requests so they always set the Content-Length header even when no request values are submitted.


Release Notes: This release adds support to disable SASL authentication so it can perform OAuth authorization without prompting for SASL libraries.


Release Notes: This release adds support for returning numeric error codes to let the application treat HTTP access errors according to the type of error. It also fixes the handling of malformed redirection URLs returned by the Location response headers.


Release Notes: This release fixes a bug in the connection to SSL servers that prevented it from working with servers with SSL virtual hosts. It also fixes the setting of the user name when connecting to a server via a SOCKS 4 proxy.


Release Notes: This release fixes a bug in handling cookies due to case sensitive cookie attribute names. It also adds a new function that can read whole HTTP reply body parts in a single call. It also adds support to set the Accept header value to be sent in all request headers, including redirected and authenticated requests. Now it is also possible to dump debug information to a file instead of the script output.
Recent comments
12 Jul 2007 10:27
Re: Example of test_http_post.php with authentication
> I do not understand how to do a http
> post with digest authentication using
> the http.php class file.
>
> Would it be possible to add digest
> authentication to the test_http_post.php
> example to help me please
You need to include the SASL class. That is listed on the package dependencies.
BTW, in the future please use the package discussion forum (www.phpclasses.org/dis...), as it is easier for me to provide support there.
12 Jul 2007 09:25
Example of test_http_post.php with authentication
I do not understand how to do a http post with digest authentication using the http.php class file.
Would it be possible to add digest authentication to the test_http_post.php example to help me please
08 Nov 2005 13:06
Re: Supporting HTTP Digest Authentication
In case you have not noticed, both the SASL package and the HTTP client class were updated and they support HTTP Digest authentication now.
26 Oct 2005 22:35
Re: Supporting HTTP Digest Authentication
> I'm not sure if this is helpful, but in
> the comments for the fopen function
> someone posted some code that appears to
> interact (as a client) with HTTP digest
> servers, although they're using it
> specifically to do a file download:
>
I see. That may work in some cases, but the implementation is not really error proof. It is better to follow the HTTP Digest RFC to learn how to do it right.
Meanwhile I implemented it now. Both HTTP and SASL classes were updated to make it work. It can authenticate with Hotmail, but keep in mind that Microsoft restricts the access to Hotmail via Outlook Express to paying subscribers.
25 Oct 2005 10:59
Re: Supporting HTTP Digest Authentication
> This should be sufficient to let me test
> a new SASL class plug-in that implements
> HTTP Digest authentication. I will try
> to develop that ASAP. Hang on.
I'm not sure if this is helpful, but in the comments for the fopen function someone posted some code that appears to interact (as a client) with HTTP digest servers, although they're using it specifically to do a file download: