I tried to get device id from mobile through PHP code. Is there any possibility to get mobile device id from PHP code.
Asked
Active
Viewed 1.5k times
-1
-
and **what** exactly have you tried? – Franz Gleichmann Feb 28 '17 at 06:45
-
'; echo $_SERVER['REMOTE_PORT']; – user1124166 Feb 28 '17 at 06:46
-
2Possible duplicate of [Get Specific Device Information](http://stackoverflow.com/questions/14646918/get-specific-device-information) – LF00 Feb 28 '17 at 06:51
2 Answers
0
There is a really simple solution to use Mobile-detect here: https://github.com/serbanghita/Mobile-Detect/
Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. http://mobiledetect.net

NID
- 3,238
- 1
- 17
- 28
-
Device id will be like this - "AAAAmPJV_co:APA91bHokL8oQo1zJvbkn_Z7zllNELhu0LTEKz3liuxPhpgjnQdhcmWeB1EfHfR7dyqiTMK4tiT1********************************************" – user1124166 Feb 28 '17 at 06:57
-
-
0
You will NOT get real device ID in $_SERVER. User agent does not contain that info as well. You cannot access that data just using php or anything else, that is NOT executed on phones.

Dainius Pocius
- 21
- 1
- 4