1

I need to fetch the IMEI numbers from the android devices when my web page is loaded in the browser, pages would be written in php .. i need to get the imei numbers from the devices and post it to some pages on server for authentication purpose ..

i came across many work around that is possible through java client application but that is not useful for my project...

I have tried with SNMP protocols to get all system information like disk drives/ system process list/ up time/ down time and basic system description but that wont provide level of information which would be needed to accomplish this task..

Is there any way to fetch IMEI numbers or any unique ids of the systems on web using php application..


How this can help can any body suggest.. get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); inside php program..

The idea is to write java program that implements the IMEI fetching i.e How to get the device's IMEI/ESN programmatically in android? inside php program to fetch the system information...

Refer: php.net/manual/en/java.examples-basic.php

any body have suggestion to work around.

Thanks,

Community
  • 1
  • 1
Varun Kumar
  • 31
  • 1
  • 1
  • 4
  • 1
    This would be a major privacy problem if it were possible. – Pekka Jan 20 '13 at 15:25
  • @ Pekka thanks, Is it possible to fetch those datas over ssh connections issuing some commands over ssh to get those informations.. or any other system access levels... – Varun Kumar Jan 20 '13 at 15:39
  • I came across this solution How this can help can any body suggest..// get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); the idea is to fetch java classes to impliment this http://stackoverflow.com/questions/1972381/how-to-programmatically-get-the-devices-imei-esn-in-android inside php program to fetch the system information... http://php.net/manual/en/java.examples-basic.php – Varun Kumar Jan 21 '13 at 08:13

2 Answers2

1

So, essentially you only want to have your web page available, that Android devices access?

Your client is a browser and browser just doesn't send out that kind of information. Look at the request headers for what's available. And this would be a huge privacy issue if it did.

So if you really have that kind of requirements, you have to create your own Android app. And while there is Quercus (that can run PHP on JVM), I think a mash-up browser with Android Java SDK would be a lot easier to accomplish. PHP5 is very similar in syntax to Java anyways.

Check http://developer.android.com/reference/android/webkit/WebView.html for the browser-side and How to get the device's IMEI/ESN programmatically in android? for IMEI.

Community
  • 1
  • 1
Mirko Adari
  • 5,083
  • 1
  • 15
  • 23
  • Thanks, yes i do think same but i am hoping to list all possibilities..any Api that can stream the imei numbers from the devices by looking up its ip... or else a fusion solution with java and php... m really in state of confusion. – Varun Kumar Jan 20 '13 at 15:33
  • Ya thats better solution let me try that it may again consume great amount for time to configure all clients and program it. thanks – Varun Kumar Jan 20 '13 at 16:05
0

Will your webpage be loading inside an app? If yes, then you could use How to get the device's IMEI/ESN programmatically in android? to get the same

Otherwise, if you are just loading the page inside the phone's browser, I am afraid it will not allow you to do access the IMEI

By the way, there are several other ways of authentication besides IMEI. Do you have any specific requirements to use only IMEI. If you post your authentication needs, we might be able to suggest alternative solutions.

Community
  • 1
  • 1
Akshay Agarwal
  • 1,959
  • 1
  • 16
  • 14
  • Thanks, If its possible by IMEI numbers it would be great.. because i got requirements for same. i would like to know what would be alternative for this.. I want to restrict the user to login from specific tabs/devices to my application.. its completely browser based application written in php... – Varun Kumar Jan 20 '13 at 15:48
  • @VarunKumar If you are restricting over the 'model' of the device (Eg: HTC Salsa) then you will get that value in the HTTP Request Header under 'User Agent' Else if you have a list of IMEI numbers which should be able to access it, you might provide them one time passwords which they can use to authenticate & once they do that use a cookie to store a unique hash of the IMEI so that it will be provided to you in every request. However, due to the nature of cookies, it might be short lived since the user may choose to clear his cookies or it may expire after a certain period of time. – Akshay Agarwal Jan 20 '13 at 20:39