I\'ve just been looking through a website\'s error_log and one of the error\'s that has been logged a few times is:
[21-Jun-2011 12:24:03] PHP Not
Yes, it's possible, this a HTTP header sent (or not sent) by client, and you should not rely on it. From php manual:
Contents of the User-Agent: header from the current request, if there is one
So the correct code would be:
private function ipad_request() {
return isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'iPad');
}