I am working on a PHP application, the mobile app requests to PHP app for some service. The mobile app is sending a device token to server. So I want to find out what mobile OS the request is coming from? It's android or iPhone?
Asked
Active
Viewed 935 times
-1
-
You can get Device model and send... – M D Oct 17 '14 at 11:22
1 Answers
2
If you need only separate android and iphone, add to request parameter &os=android
in android's code and &os=iphone
in iPhone's code.
Add: Also you can used the $_SERVER[ 'HTTP_USER_AGENT']
.

Arslan Ali
- 17,418
- 8
- 58
- 76

Tapa Save
- 4,769
- 5
- 32
- 54
-
yes that i know, but we can't make changes it now. Is their another solution ? I want to do it at server side. – Deepti Kakade Oct 17 '14 at 11:19
-
-
-
hey I got the solution, same as you mention above, I used the $_SERVER[ 'HTTP_USER_AGENT'] for geting type of device – Deepti Kakade Oct 17 '14 at 12:55