error_reporting(0);
$url = "http://www.zin-onzin.nl/Inspiratie/spreuk"; // Trailing slash when not using filename
$file = "content2.inc"; // file to write to. remember to chmod 777 to not get errors
$unique_start = ""; // Where to begin to grab
$unique_end = ""; // Where to end the grab
######################################################
## No editing below here
## Editing below this line voids warranty :-)
######################################################
ini_set('max_execution_time', '0');
flush ();
// fetch domein from url
$fetch_domain = parse_url($url);
$fetch_domain = $fetch_domain[host];
// Host checking code
$socket_handle = fsockopen("$fetch_domain", 80, $error_nr, $error_txt,30);
if(!$socket_handle)
{
print("Cannot make a connection to: $fetch_domain and therefore cannot collect your requested data");
$contents = implode("",@file( $file ) );
echo $contents;
exit;
}
$fd= fread(fopen("$url", "r"), 100000);
if ($fd)
{
$start= strpos($fd, "$unique_start");
$finish= strpos($fd, "$unique_end");
$length= $finish-$start;
$code=Substr($fd, $start, $length);
$code2=Substr($fd, $start, $length);
}
######################################################
## No editing above here
## Editing above this line voids warranty :-)
######################################################
// $code = preg_replace('rick', 'cms', $code);
// uncomment the above line to edit the output
$stukken = explode ("zin=", $code);
$stuk1 = $stukken['1'];
$stuk2 = explode ("
zin2=", $stuk1);
$toon1 = $stuk2['0'];
$toon2 = $stuk2['1'];
//echo $toon1;
//echo $toon2;
$tmpfile = fopen($file,"w+");
$fp = fwrite($tmpfile,$code);
fclose($tmpfile);
?>
document.write('');