I am developing an app which is doing a http-post to php-file on my webbserver. My question is if it is possible to perform a check (within php) which controls that the post is done by an android device, I know I can generate som sort of key, but the first version of my app is already out there, and I wan’t it to be valid for those to. Is the best way to go with a $_REMOTE[] object or is there another way?
Thanks
Not really. You can check the “User-Agent”, but if you didn’t customize it, it will probably say something generic such as “Apache-HttpClient/UNAVAILABLE(java 1.4)”. Also keep in mind, that anyone can set any User-Agent header, so that’s not a guarantee.