RE: [PEAR] HTTP_Request unknown error connecting to HTTPS address
| From: | Denis Gerasimov | Date: | Fri, 14 Apr 2006 06:56:54 +0000 |
| Subject: | RE: [PEAR] HTTP_Request unknown error connecting to HTTPS address | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23647@lists.php.net to get a copy of this message | ||
Hello Matt,
I had the same problem in the past when I tried to send a SOAP request over
the HTTPS protocol.
AFAIK HTTP_Request does not support HTTPS (as I can remember I also had a
look at the sources to be sure that is doesn't).
Also that would be a good idea to var_dump all the vars used in your script
to check that they have correct values.
Have a great day,
Denis S Gerasimov
Web Developer
Team Force LLC
Web: www.team-force.org
RU & Int'l: +7 8362-213555
email: denis.gerasimov@team-force.org
> I am trying to use HTTP_Request to post data to an HTTPS address. I am
> not receiving any response back when I try however.
>
> <?php
> function epdq_post_xml($xmlinput) {
>
> # URL FROM CONFIG FILE
> global $EPDQ;
>
> require 'HTTP/Request.php';
> $r = new HTTP_Request($EPDQ['URL']);
>
> # SET TO POST DATA, NOT GET
> $r->setMethod(HTTP_REQUEST_METHOD_POST);
>
> # ADD POST PARAMETER
> $r->addPostData('CLRCMRC_XML',$xmlinput);
>
> # DO POST
> $ErrorCheck = $r->sendRequest();
>
> # ERRROR CHECK
> if ( PEAR::isError($ErrorCheck) ) {
> echo "Connection problem: ".$ErrorCheck->toString();
> }
> if ( $r->getResponseCode() != '200' ) {
> echo "Request failed: ".$r->getResponseCode();
> }
>
> # GET RESPONSE
> $xmloutput = $r->getResponseBody();
>
> return stripslashes($xmloutput);
> }
> ?>
>