I’m designing a PHP web application that will accept and process data sent from a mobile device. I was planning on using HTTP post requests to send the data from a mobile device, but I need to verify the data being received by the web application is coming from one of my devices.
Would giving each device a unique ID and passing this (encrypted) as part of the post request, then verifying server side fulfil this requirement, or would opening a web-socket connection and carrying out some sort of verification through this be a better solution?
Thanks in advance,
Dan
I think your unique ID is appropriate however depending on the level of security you may want to look into https too.
Make sure the ID value is hashed with the message your sending or something else so it’s never the same value so not easy for someone just to hand recreate the message to spoof your system if you’re worried this may happen.