在我较早的帖子中,我寻求帮助来解析来自外部网站的数据,到目前为止,我终于从我想要数据的网站上获得了一些内容。但是我无法显示未显示的公里数,我也不知道如何正确地做到这一点,但我认为即时战略是正确的。希望有人能进一步帮助我。
我要解析的网站数据: http://basic.usedcarportal.nl/html/result.php?klant=00843&klantnr=950
结果与我的代码: http://zoo-media.nl/script/
代码:
<?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/>
';
}
?>