ansari81 Posted January 26, 2007 Share Posted January 26, 2007 Hi, I have using the XML web services to integrate with UPs shipping I have using the following code and the error as output as follows, [b][i]if(!is_callable("curl_exec")) die("USPS::submit_request: curl_exec is uncallable");$ch = curl_init();curl_setopt ($ch, CURLOPT_URL,$post_url); //$post_url is a URL where we have post the datacurl_setopt ($ch, CURLOPT_HEADER, 0);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_request"); //Post the data as XML formatcurl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);$xml_result = curl_exec ($ch);curl_close ($ch);var_dump($xml_result);[/i][/b]While I execute the above code i get the error saying that [i][b]bool(false)[/b][/i]I have got some befor from other resources they are said that "[i]Please check your error log for cURL specific errors. It sounds like your server isn't connecting to the UPS web service at all. There should be an error message unless verbose errors are disabled in your php.ini file.[/i]"By the above advice i make php.ini file with the following line [i]log_errors = Onerror_log = error_log[/i]I din't found any size variation on php.ini i.e. No error has been stored in php.ini. Sombody please help me I'm in very urgent to do this process Quote Link to comment Share on other sites More sharing options...
linuxdream Posted January 26, 2007 Share Posted January 26, 2007 Not sure exactly what you are looking to do...but I would imagine that you want to grab tracking information or something like that. As I have mentioned in this forum before, I have written a PHP class called ripCURL that makes data retrieval really easy. You need curl (obviously) and at least PHP5. The class is located at: http://ripcurl.sdsustudent.com/ which has the most up to date release. It is also at: http://sourceforge.net/projects/ripcurlThere is included documentation (in .doc format...I know, I'm sorry) that should guide you into using the class. For instance, if you are trying to automatically get to the tracking page then pull some data...might look something like this:[code]<?phprequire_once('ripcurl.class.php');$rip = new ripcurl();//Get first page$rip->ripRun('http://ups.com/content/us/en/index.jsx', 1);//Gather and change form data$data = $rip->getFormElements('trackMod');$data['AgreeToTermsAndConditions'] = 'yes';$data['tracknum'] = 'your tracking number here';$form = $rip->getFormInfo('trackMod');//Post data to display tracking info page$rip->ripRun($form['action'], 1, $data);echo $rip->getRawHtml();?>[/code]Something like this should work.... Quote Link to comment Share on other sites More sharing options...
ansari81 Posted January 27, 2007 Author Share Posted January 27, 2007 Thanks for your help. My problem is not with the cURL, when i write the cURL error, I have got the following error as [i][b]SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed[/b][/i]Please help me how could over come this problem. Thanks in advance Quote Link to comment Share on other sites More sharing options...
linuxdream Posted January 27, 2007 Share Posted January 27, 2007 It is with curl if your getting errors from curl. You need to tell curl not to verify the host or peer...CURLOPT_SSL_VERIFYHOST, 0CURLOPT_SSL_VERIFYPEER, 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.