Code: Select all
if ((preg_match("/(iPhone|BlackBerry|Android|motorola|nokia|panasonic|playbook|ipod|alcatel)/", $_SERVER["HTTP_USER_AGENT"])))
{ }So if it is seen as a mobile, I can change it from 60 per page, to maybe 30 per page.
The code above I think spots the device, but is that the best way to do it? To wrap the Query into that {} code...?