Client side HTTP Digest Authentication using PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • S?rgio Nunes

    Client side HTTP Digest Authentication using PHP

    Hi,

    I'm trying to retrieve the contents of a URL using
    file_get_conten ts($url). The problem is that the URL is protected via
    *HTTP Digest Authentication* .

    Is there any php library that can handle all the necessary headers
    during the request, or do I have to do it manually ?

    Thanks!
    Sérgio Nunes
  • Andy Hassall

    #2
    Re: Client side HTTP Digest Authentication using PHP

    On 19 May 2004 11:21:18 -0700, ssn.google@port ugalmail.com (S?rgio Nunes)
    wrote:
    [color=blue]
    >I'm trying to retrieve the contents of a URL using
    >file_get_conte nts($url). The problem is that the URL is protected via
    >*HTTP Digest Authentication* .
    >
    >Is there any php library that can handle all the necessary headers
    >during the request, or do I have to do it manually ?[/color]

    Probably http://php.net/curl

    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

    Comment

    • S?rgio Nunes

      #3
      Re: Client side HTTP Digest Authentication using PHP

      Hi,

      thanks for the answer but HTTP Digest is not (yet) supported using
      PHP's CURL, as I figured out in this thread:



      Sérgio Nunes

      Andy Hassall <andy@andyh.co. uk> wrote in message news:<ifdna0hpg 36ormue7uh6ee9e 6pks5p0sg1@4ax. com>...[color=blue]
      > [...]
      >
      > Probably http://php.net/curl[/color]

      Comment

      • Chung Leong

        #4
        Re: Client side HTTP Digest Authentication using PHP

        "S?rgio Nunes" <ssn.google@por tugalmail.com> wrote in message
        news:d1aaa84f.0 405200145.58176 ae4@posting.goo gle.com...[color=blue]
        > Hi,
        >
        > thanks for the answer but HTTP Digest is not (yet) supported using
        > PHP's CURL, as I figured out in this thread:
        >
        > http://www.zend.com/lists/php-dev/200401/msg00568.html
        >
        > Sérgio Nunes
        >
        > Andy Hassall <andy@andyh.co. uk> wrote in message[/color]
        news:<ifdna0hpg 36ormue7uh6ee9e 6pks5p0sg1@4ax. com>...[color=blue][color=green]
        > > [...]
        > >
        > > Probably http://php.net/curl[/color][/color]

        In that case, see
        http://www.php.net/manual/en/functio...-meta-data.php on how to get
        the HTTP response, and
        http://www.php.net/manual/en/functio...ext-create.php on how to
        set headers in a request.

        Shouldn't be too hard to do manually. Just need to follow the RFC very
        carefully.


        Comment

        Working...