I am trying to get rate quotes back from a freight carrier. I am getting the info parsed back to me but in the form of raw data not xml. I need it in XML so I can parse just once element of the response. Here is the code i am using:
require_once('Curler.php');
use grafhax\Curler;
$soap = file_get_contents('request.xml');
//print_r($soap);exit;
$user= '******';
$pass= '*******';
$curl = new Curler();
$curl->fail_on_error = 0;
$curl->debug=true;
$curl->SetHeader('Content-Type', 'text/xml;charset="utf-8"');
//$curl->PostData('http://ift.tt/1xIrnPj', $soap, false, true, false, '', "$user:$pass");
//var_dump($curl->response);
//exit;
//$curl->PostData('http://ift.tt/1xIrnPj', $soap, $this- >lastUrl, true, false, '', "$user:$pass");
$curl->PostData('http://ift.tt/1xIrnPj', $soap);
var_dump($curl->response);
?>
Which gives me a response of: Library: Curler set header variable: Content-Type=>"text/xml;charset="utf-8"" Library: Curler post request: "http://ift.tt/1xIrnPj" string(3419) "HTTP/1.1 100 Continue HTTP/1.1 200 OK Date: Mon, 17 Nov 2014 16:30:47 GMT X-Powered-By: Servlet/3.0 Content-Length: 3107 Content-Type: text/xml; charset=utf-8 Content-Language: en-US Set-Cookie: BIGipServerPoolC=84279562.20480.0000; path=/ X-PvInfo: [S10413.C0.A0.R0.G0].[OT/http://ift.tt/1xIrnPn] 07816643490520RANDLEMANNC27317GREENSBORO SERVICE CENTERMiamiFL33101MIAMI SERVICE CENTER11/17/20142Class 6050037.48 Rated As Class 50.0$187.40[None]0[None]0[None]0[None]0[None]0[None]0[None]0[None]0[None]0[None]0[None]0$125.5667.0900CZARLITE $0.00$17.0757.50$78.91$187.40$187.40500Mon Nov 17 10:30:50 CST 2014"
No comments:
Post a Comment