In my earlier post I asked for help to parse data from an external website, for so far I finnaly get some content from the website I want the data from. But I can't get the kilometers not displayed, and I dont know exactly how to do it the right way, but I think im on the right way. Hope some one can help me further.
Website data I want to parse: http://basic.usedcarportal.nl/html/result.php?klant=00843&klantnr=950
Results with my code: http://zoo-media.nl/script/
Code:
<?php
$post = [
'bouwjaar-max' => '2011',
'bouwjaar-min' => '1999',
'cilinder-max' => '100000',
'cilinder-min' => '0',
'field' => 'renew',
'groepnr' => '',
'klant' => '00843',
'klantnr' => '950',
'km-max' => '100000',
'km-min' => '0',
'limit' => '10',
'order' => 'ASC',
'postcode' => '',
'prijs-max' => '100000',
'prijs-min' => '0',
'result' => 'on',
'sort' => 'prijs',
'start' => '0',
'uid' => ''
];
$ch =
curl_init('http://basic.usedcarportal.nl/get_handlers/get_zoek.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
$jsondata = json_decode($response);
foreach ($jsondata->resultset->data as $v) {
echo '
<hr>
<img src="'.$v->foto.'"><br />
'.$v->uitvoering.'<br />
'.$v->verkoopprijs.'<br />
<br/>
';
}
?>