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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.