Projects / PHP HTTP protocol client

PHP HTTP protocol client

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
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  20 Feb 2013 17:54

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

    •  08 Oct 2012 19:31

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

      •  23 Nov 2011 11:48

        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.

        •  15 Aug 2011 11:51

          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.

          •  27 Jan 2011 12:37

            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.

            RSS Recent comments

            12 Jul 2007 10:27 mlemos

            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 nicklewis

            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 mlemos

            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 mlemos

            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:

            > us2.php.net/manual/en/...

            >

            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 tlianza

            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:

            us2.php.net/manual/en/...

            Screenshot

            Project Spotlight

            LanguageTool

            A style and grammar checker for English, Polish, German, and other languages

            Screenshot

            Project Spotlight

            XiX Music Player

            A music player for MP3, Ogg, and FLAC files.