Hi,
I'm trying out some PHP, and am playing around with the CURL function to extract the source code and traverse my site for errors...etc. The PHP is working fine.
$url = "http://www.testsite.com/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
$result = curl_exec($ch);
curl_close($ch);
Just out of curiosity, I've got a question regarding the CURL function.
My php code is currently saved as a web page (check_errors.php) that is set on a loop, say every ten minutes or so. Each time it accesses the URL via the CURL function, does that count as a hit? i.e. a visit from a user? being a server side script, I'm not sure if it is...
If it is counted as a 'visit', would it register as a click from web page check_errors.php, with my IP address? This would make the website look like its getting more hits than it really is...?
Cheers. vš