Have a question about monitoring data transfer.
Our situation would be something similar to
Apache Server <-----> Mobile Device
We need to do 2 things
So in our database we'd be able to store like
Device ID | Uploaded | Downloaded
The logic for the saving etc is fine, we just need to know how we'd calculate the size of the requests.
I believe when the device sends the server information, we can use PHP to read $_SERVER['CONTENT_LENGTH'];
to see how big that piece of data is. However not sure how we'd do this the other way around.
It depends how the data is encoded when it's outputed. If you are using the json_format you can use strlen function.
Example
echo $data; where $data = json_encode(array('what' => 'you, 'send'));
and a simple
$len = strlen($data); will show you.
If it's the right way I understood the question.