Re: HTTP_Request not following redirects
| From: | Justin Patrin | Date: | Sun, 03 Dec 2006 17:43:12 +0000 |
| Subject: | Re: HTTP_Request not following redirects | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25962@lists.php.net to get a copy of this message | ||
On 12/1/06, diro@nixsys.bz <diro@nixsys.bz> wrote:
Hello, Here's the sample code: <?phpWhat version of HTTP_Request are you using? Have you tried upgrading it? -- Justin Patrininclude ('HTTP/Request.php');$req = &new HTTP_Request('http://www.$SITE.com/cgistuff.cgi', array('allowRedirects'=>true));$req->setMethod(HTTP_REQUEST_METHOD_POST);$req->addPostData('var1', 'arg1');$req->addPostData('var2', 'arg2');$req->addPostData('var3', 'arg3');$req->sendRequest();$response1 = $req->getResponseBody();echo $response1;?> Now, i know it's POSTing correctly, because of the address returned in the headers. I can see via getResponseCode that it's 302, obviously not redirecting for some reason. Any ideas? Need more info?