Re: Send username & password in HTTP headers
| From: | Nagendra Prasad | Date: | Wed, 12 May 2004 16:16:32 +0000 |
| Subject: | Re: Send username & password in HTTP headers | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186006@lists.php.net to get a copy of this message | ||
Hi,
That worked,
Thanks a lot..
Regards
TNP
Professional Services
ZUSTEK INDIA
______________________________________________________________________________
---------- Original Message -----------
From: Chris Shiflett <shiflett@php.net>
To: nthumuluru@osi-tech.com, php-general@lists.php.net
Sent: Wed, 12 May 2004 08:55:55 -0700 (PDT)
Subject: Re: [PHP] Send username & password in HTTP headers
> --- Nagendra Prasad <nthumuluru@osi-tech.com> wrote:
> > I'm posting some XML data to my client's website using HTTP Post.
> > Assume I'm posting to getxml.php (hosted on my clients server).
> > Now my client has put authentication on his website using
> > header('WWW-Authenticate: Basic realm="Private Area"');
> >
> > Now the page getxml.php asks me to prove my identity before it
> > acceps my xml posts. So how do I send the username & pwd when I'm
> > posting the xml details?
>
> Include an Authorization header, which should look something like this:
>
> Authorization: Basic bXluYW1lOm15cGFzcw==
>
> The encoded string is just the result of this:
>
> base64_encode('myname:mypass')
>
> Substitute with the correct username and password.
>
> Hope that helps.
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security - O'Reilly
> Coming Fall 2004
> HTTP Developer's Handbook - Sams
> http://httphandbook.org/
> PHP Community Site
> http://phpcommunity.org/
------- End of Original Message -------