Kristoff1875 Posted June 22, 2012 Share Posted June 22, 2012 I was retrieving XML from a remote server using the following from a form: ob_start(); //extract data from the post extract($_POST); //set POST variables $url = '***'; $fields = array( 'ESERIES_FORM_ID'=>urlencode('**'), 'MXIN_USERNAME'=>urlencode('**'), 'MXIN_PASSWORD'=>urlencode('**'), 'MXIN_VRM'=>urlencode($regHome), 'MXIN_TRANSACTIONTYPE'=>urlencode('**'), 'MXIN_PAYMENTCOLLECTIONTYPE'=>urlencode('**'), 'MXIN_CAPID'=>urlencode('**') ); //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); //execute post $result = curl_exec($ch); //close connection curl_close($ch); $str = ob_get_contents(); ob_end_clean(); But now I need to use a new provider and I think the service is being handled a different way. I've swapped the necessary values in the form to send to the remote server, but i'm not having any joy in receiving anything back, so wondering if it handles a different way? I've been provided the following: https://www1.carwebuk.com/CarweBVrrB2Bproxy/carwebVrrWebService.asmx?op=strB2BGetVehicleByVRM Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/264618-retrieving-xml-provider-changed/ Share on other sites More sharing options...
Mahngiel Posted June 22, 2012 Share Posted June 22, 2012 This new service isn't offering XML. It's either a SOAP request for $_POST / $_GET. Quote Link to comment https://forums.phpfreaks.com/topic/264618-retrieving-xml-provider-changed/#findComment-1356213 Share on other sites More sharing options...
Kristoff1875 Posted June 22, 2012 Author Share Posted June 22, 2012 The new service does provide a remote XML when the details are completed in the form, which is what the old service did also. I think it's just the way it handles it is different? Quote Link to comment https://forums.phpfreaks.com/topic/264618-retrieving-xml-provider-changed/#findComment-1356218 Share on other sites More sharing options...
Kristoff1875 Posted June 23, 2012 Author Share Posted June 23, 2012 Sorted, I missed out a value where the xml values are called in to PHP values. Quote Link to comment https://forums.phpfreaks.com/topic/264618-retrieving-xml-provider-changed/#findComment-1356423 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.