Jump to content

Retrieving XML, provider changed...


Kristoff1875

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/264618-retrieving-xml-provider-changed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.