I'm working on an Android app that gathers the entire phonebook content on the device and sends the data over to a PHP script running on Apache for further processing.
My question is, which of the following is the most efficient method of pushing this data over?
- Write data into a plain-text file and send it over to PHP where it'll be parsed and further processed as needed.
- Send the data in the form of a basic key-value pair array via HTTP-POST; the PHP script can then easily retrieve the information off the $_POST array.
Also, please do suggest if there's a more efficient alternative to the above two, e.g., JSON, etc.
Needless to say, the payload will vary wildly depending on the number of entries in the user's contact list.