Hello there everyone,
Been a while since I last posted. I've successfully retrieved external HTML pages using Curl, through the following code:
$ch = curl_init("http://www.site.com/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
$content = curl_exec($ch);
curl_close($ch);
I then tried adding something, which I thought that there certainly has more to it than that but tried it anyway:
if(strpos($content,"string_to_search_for") == false) echo "Not found."; else echo "Found.";
Now this returned "Not found" every time for me, even if the string was present in that page source code.
On a side note, I will be using this to evaluate hundreds, potentially thousands of websites to see if they have that string present in the source code. How long do you think execution time would be for say, a 1000 URL? And would there be a better approach to speed things up?
Thanks!