0

I have an application made in Java for Android platforms, and I need to send quite a lot of data, the data I am sending is the previous weeks SMS messages received and sent. That includes the following data:

  • Sent by Phone number
  • Sent by Name
  • Sent to Phone number
  • Sent to Name
  • Time sent
  • Message

And you can imagine this data can be really big for some people so I need a way to minimize/encrypt it on one side, and then using an HTTP request I can send it over to my server, and decrypt this data with PHP. What is the best method to do this? What size limit does HTTP POST have?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Qasim
  • 1,686
  • 4
  • 27
  • 51

3 Answers3

1

I think you should zip+encrypt(say, using aes) the data on Android side before sending the data to your server and decrypt+unzip it on the server side.

Post size depends on the config on the server side -> What is the size limit of a post request?.

p.s. why would anyone want to send all their sms messages to your server? :)

Community
  • 1
  • 1
denis.solonenko
  • 11,645
  • 2
  • 28
  • 23
  • I'm making an application that lets you send/receive SMS messages from the web. Thanks for the suggestion :) A requested feature from many people is to sync their recent SMS messages. – Qasim Aug 01 '11 at 03:12
  • @Qasim I see. You can take a look here http://stackoverflow.com/questions/3873927/write-aes-encrypted-zip-and-read-encrypted-zip-via-java for some ideas. I'm not sure if the library mentioned in the thread will work on Android or not, but the idea should hold the same. – denis.solonenko Aug 01 '11 at 03:35
  • Many thanks. I'll leave this open for the night and see tomorrow if any more efficient options are available. If not, you're answer will win :) Thanks again. – Qasim Aug 01 '11 at 03:45
0

You'll want to send the data using an HTTP POST. The limit on the HTTP POST size depends on the server receiving the data. For example a PHP server has the post_max_size property that (I think) by default is 16M. In terms of encryption start by making sure the request is being sent over HTTPS.

George P
  • 736
  • 5
  • 12
0

Do you have Gzip option turn on in your Apache HTTPD server?

This way the web server will compress and serve slightly packed files to and bro your browser.

Oh Chin Boon
  • 23,028
  • 51
  • 143
  • 215