I think Zoran will kill you for this, Philipp. ;-D |
But...but...Google doesn't WANT us to scrape, do they? |
tried but it returns an error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/combine/public_html/sex.php5 on line 16
Philipp, any idea? |
Ouch. Something killed the backslashes in the post. I updated the source again. |
Thanks Philipp, it works fine now!!! |
my host has disabled file_get_contents for url's. I got round it by using curl. The code below should REPLACE the line containing file_get_contents. <code> // // file_get_contents is disabled – must use curl // $result = file_get_contents($url); $ch = curl_init($url); $handle = fopen("page1.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $handle); curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch); curl_close($ch); fclose($handle);
$handle = fopen("page1.txt", "r"); $result = ''; while (!feof($handle)) { $result .= fread($handle, 8192); } fclose($handle); // $result = file_get_contents($url); // file_get_contents is disabled – must use curl </code> |
Martin, I had the same problem here for a long period of time (with Schlund/ 1&1), and also used your workaround to replace file_get_contents. These days they support file_get_contents again :) |