2

I´m writing an app where i a user can store a text in a SQL Database. This is send via AJAX to my server and via PHP to the SQL database. There should be a restriction: The user should be able to upload a text only once! I first mentioned the IP, but if you´re online with GPRS (carrier) then multiple devices got the same IP adress.

How can I identify the smartphone, which is accessing the database?

m1crdy
  • 1,371
  • 2
  • 25
  • 58
  • I guess you aren't using any specific user credentials in your app? – iaindownie Jul 09 '13 at 11:19
  • Might this be useful? http://stackoverflow.com/questions/2112965/how-to-get-the-android-devices-primary-e-mail-address – iaindownie Jul 09 '13 at 11:21
  • nope no credentials... no login... – m1crdy Jul 09 '13 at 11:32
  • @iaindownie i don´t think, that all of my users have their email adress installed on their phone. :( thx 4 your help! – m1crdy Jul 09 '13 at 11:34
  • OK, see this also: http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id I don't know if you really NEED IP addresses, or just reasonably unique. – iaindownie Jul 09 '13 at 11:35
  • this is in JAVA. I´m developing in HTMl CSS JS and phonegap... – m1crdy Jul 09 '13 at 12:23
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/33135/discussion-between-m1crdy-and-iaindownie) – m1crdy Jul 09 '13 at 12:26

1 Answers1

1

I took the DeviceID as a unique itendtifier. In Phonegap you can get it with:

var id = device.uidd; 
m1crdy
  • 1,371
  • 2
  • 25
  • 58