Re: PEAR::HTTP_REQUEST -> HTTP_CLIENT
| From: | hugo | Date: | Mon, 31 Jan 2005 07:16:46 +0000 |
| Subject: | Re: PEAR::HTTP_REQUEST -> HTTP_CLIENT | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17284@lists.php.net to get a copy of this message | ||
Ok I found the problem, the adress had a little mistake. Maybe It should
provide a appropriate response code to see it because "Operation succeeded"
is not very easy to understand ^^.
But it works now, thank you justin for all your help.
----- Original Message -----
From: "Justin Patrin" <papercrane@gmail.com>
To: "hugo" <hugo123fr@hotmail.com>
Cc: <pear-general@lists.php.net>
Sent: Friday, January 28, 2005 6:24 PM
Subject: Re: [PEAR] PEAR::HTTP_REQUEST -> HTTP_CLIENT
> On Fri, 28 Jan 2005 13:40:38 +0100, hugo <hugo123fr@hotmail.com> wrote:
> > For the inclusion, I correct it.
> > For the quote, in fact I have quote but outlook had suppress it or
maybe I
> > made a mistake in my copy paste. But there are here ^^
> >
> > It's very strange because I added debug trace here :
> >
> > if (!PEAR::isError($res))
> > {
> > $response2 = $client->currentResponse();
> > $bodyresponse2 = $response2['body'];
> > }
> > else
> > {
> > echo "Failed after post </BR>";
>
> FYI, these should be <br/>, not </br>.
>
> > echo "[".$res->getDebugInfo()."]</BR>";
> > echo "[".$res->getMessage()."]</BR>";
> > }
> >
> > And I get :
> > Failed after post
> > []
> > [succeeded operation. ]
> >
> > If operation succeeded, I didn't notice it ^^
>
> Try getting the last response and seeing what's in there. Also, try a
> print_r of the entire client and see what you find. Lastly, check the
> reposted bugs for HTTP_Client, HTTP_Request, and Net_Socket to see if
> there's anything similar to your problem.
>
> >
> > ----- Original Message -----
> > From: "Justin Patrin" <papercrane@gmail.com>
> > To: "hugo" <hugo123fr@hotmail.com>
> > Cc: <pear-general@lists.php.net>
> >
> > Sent: Thursday, January 27, 2005 10:00 PM
> > Subject: Re: [PEAR] PEAR::HTTP_REQUEST -> HTTP_CLIENT
> >
> > > On Thu, 27 Jan 2005 21:05:18 +0100, hugo <hugo123fr@hotmail.com>
wrote:
> > > > As I said in the first message below, I tried to navigate on my
website
> > with
> > > > Http_request and Justin answer me that I have to use Http_client. So
I
> > > > tested like this :
> > > >
> > > > require_once 'Client.php';
> > >
> > > This should be require_once('HTTP/Client.php'); If you're doing it
> > > this way your PEAR installation is not set up correctly. You *will*
> > > get inclusion errors if you do it this way.
> > >
> > > [snip]
> > > > $res = $client->post (
> > > > http://localweb/login.php, $arrayParam);
> > > [snip]
> > > > $res = $client->get(http://localweb/printNewsAdmin.php);
> > > [snip]
> > >
> > > Put quotes around those URLs.
> > > 'http://localweb/login.php'
> > >
> > > >
> > > > And I get "Failed after 2nd request "
> > > > I don't know how to keep cookies et session variable.
> > > > Any idea ?
> > >
> > > What's the PEAR error say?
> > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Justin Patrin" <papercrane@gmail.com>
> > > > To: "Lassiege Hugo" <hlassiege@sopragroup.com>
> > > > Cc: <pear-general@lists.php.net>
> > > > Sent: Tuesday, January 25, 2005 5:12 PM
> > > > Subject: Re: [PEAR] PEAR::HTTP_REQUEST
> > > >
> > > > > On Tue, 25 Jan 2005 10:50:30 +0100, Lassiege Hugo
> > > > > <hlassiege@sopragroup.com> wrote:
> > > > > > Hi,
> > > > > > This is the first time I use this mailing list so I hope that I
> > didn't
> > > > make a mistake.
> > > > > >
> > > > > > I try to made test with HTTP_REQUEST package yesterday. I am
> > connecting
> > > > to my own website and then I verify that I am correctly logged in.
If
> > it's
> > > > correct, I try to print a page.
> > > > > > I use to following code :
> > > > > >
> > > > > [snip]
> > > > > > But it doesn't keep session variable and the second request
> > > > (HTTP_REQUEST_METHOD_GET) give me the loggin screen because the
> > > > authentification failed.
> > > > > >
> > > > > > Is it possible to keep session variable and to navigate into my
> > website
> > > > like this ?
> > > > > >
> > > > >
> > > > > HTTP_Request only makes *single* requests, it's not set up to keep
> > > > > state information (aka cookies). HTTP_Client, which uses
HTTP_Request,
> > > > > will do this.
> > > > >
> > >
>
> --
> Justin Patrin
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>