I am currently checking if a device is an iPad or not using the following code
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Mozilla/5.0(iPad;')) {
// probably an iPad
}
It is reliable enough for my needs. I need to detect whether it is an iPad 1, 2 or 3.
I have searched and can not find an answer that is php
based. I tried to search for distinct user agent strings but people are suggesting they are all the same for the iPad model, but different per iOS and safari version, not per iPad model.