PHP gevorderde |
|
Je was al aardig op weg, je kan met een for loop de regels echoën die je wil:
<?php
$id = 393107;
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://www.schadeautos.nl/auto.php?id='.$id.'');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
$lines = array();
$lines = explode("\n", $file_contents);
for($i = 161; $i < 230; $i++)
{
echo $lines[$i];
}
?>
<?php $id = 393107; $ch = curl_init(); $timeout = 5; // set to zero for no timeout curl_setopt ($ch, CURLOPT_URL, 'http://www.schadeautos.nl/auto.php?id='.$id.''); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $file_contents = curl_exec($ch); curl_close($ch); $lines = explode("\n", $file_contents); for($i = 161; $i < 230; $i++) { } ?>
|