On the server side you are only going to get the details posted to you by the client agent. So effectively only the user-agent string which does change and as you say shouldn't be relied upon for the iPad model.
What you will need to do is execute some check on the iPad itself, such as pushing down a bit of Javascript that will check the model and then re-direct or send data back to your server saying the iPad model number.
There seems to be a few ways to do it in Javascript, but this will not be in PHP as like I say, the server, by default is only sent the HTTP headers which do not have the necessary information to categorically know the iPad model number. You will need to run something on the client to figure this out.