str_get_html - parsing protected site

Viewed 14

i have the following code to parse a website - but i get the message, that the site is protected for robots. Any chance to get the data with a parsing script?

$site_start = 'https://suchen.mobile.de/fahrzeuge/search.html?c=Integrated&c=PartlyIntegrated&isSearchRequest=true&ref=dsp&s=Motorhome&vc=Motorhome';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $site_start);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // Location: folgen
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); // cookies unterstützen...
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // ausgabe als string
$result = curl_exec($ch);
curl_close($ch);

$html= str_get_html($result);
print_r($html);
0 Answers
Related