HTTP client request class

HTTP client is a PHP class for making HTTP requests. It can establish connections via a SOCKS server, send requests via a proxy server, and establish secure connections (HTTPS) with optional SSL client certificates. It supports HTTP authentication mechanisms like HTTP Basic, HTTP Digest, and NTLM (Windows or Samba). 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 to log in to Yahoo and execute 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

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  06 Apr 2009 14:17
  • Rrelease-after

    Changes: This release fixes the GetRequestArguments function so it resets the internal error variable to avoid accumulating errors over consecutive requests to different URLs or using different proxy servers.

    • Rrelease-mid
    •  18 Mar 2008 01:16
    • Rrelease-after

    Changes: A bug that was preventing to access SSL sites via proxies was fixed. A few functions with arguments that really did not need to be passed by reference were fixed.

    Changes: This release adds support for SOCKS protocol version 4.

    Changes: This release adds support for establishing SSL connections via non-SSL HTTP proxies.

    Changes: This release provides support for streaming request body data in small chunks of undefined length using chunked transfer encoding for PUT and POST methods. The example script for sending SOAP requests was updated to use a Web service that is currently active.

    Rss Recent comments

    Rcomment-before 12 Jul 2007 10:27 Rcomment-trans mlemos Rcomment-after

    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 (http://www.phpclasses.org/discuss/package/3/), as it is easier for me to provide support there.

    Rcomment-before 12 Jul 2007 09:25 Rcomment-trans nicklewis Rcomment-after

    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

    Rcomment-before 08 Nov 2005 13:06 Rcomment-trans mlemos Rcomment-after

    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.

    Rcomment-before 26 Oct 2005 22:35 Rcomment-trans mlemos Rcomment-after

    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:

    > http://us2.php.net/manual/en/function.fopen.php#51592

    >

    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.

    Rcomment-before 25 Oct 2005 10:59 Rcomment-trans tlianza Rcomment-after

    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:

    http://us2.php.net/manual/en/function.fopen.php#51592

    7c36288bc99768d9ead636d5886953ae_thumb

    Project Spotlight

    GADMIN-OpenVPN-Server

    An easy to use OpenVPN Server GUI.

    No-screenshot

    Project Spotlight

    drsync

    An rsync wrapper for synchronizing changes in file repositories.