Amazingly I never noticed this!
It is very possible though.
One last thing you could test: There is a setting in the iOS devices developer options where you can change the connection quality type to various things like poor quality wifi.
However, you need multiple levels of failure checking on your
attempts to communicate with your server.
Level 1 - Is internet on - if so attempt connection
Level 2 - Is response ready within a reasonable amount of time? (I use GetHTTPResponseReady in conjunction with a timer to check for a 60 second time out).
Level 3 - If the response is ready then is the response a valid response?
With Level 3 there are many many ways to do this. If your PHP script is returning specific values then you know exactly what to test for. If your script is returning more complicated things then you have to test their structure or something like a checksum. Many of my scripts will do a combination of the two.
An example of testing for structure:
PHP output is
1,2,3,4,5,6,7,8,9
If we know we are always expecting 9 comma separated numbers then we can use the CountStringToken command to check if the returned data is valid.
A second method is to use checksums on the ends of the returned string. This way you know you have all of the data.
In that case say your script returns this:
45:1,2,3,4,5,6,7,8,9:45
You know you to expect 3 string tokens separated by :
Token 1 and 3 are your checksums.
If they match then you can assume that you've got your correct data. Then you can take the second string token and do whatever you need to do with it.
Always check to make sure you're getting what you expect to be getting from the server. Bits can get lost in transmission, but this should rarely be the case. The more frequent case is human error (i.e. your script outputs something not expected).
Conversely you should also sanitize / validate input to your PHP scripts. If you know what the app is sending (is this variable a number? is there a range? is ait a string? is there a max and min length? are there illegal characters I want to escape - YES). An important note at this point is that you should always make sure to validate your PHP script input to protect your server from SQL injection attacks. There's a lot of info on this on the internet and a list of characters that should be escaped or removed before inputting them into a SQL query.
So validate as much as possible!
Also, I think you've found a nifty little bug in AGK. You should report it to them with sample code.
https://code.google.com/p/agk/
Hopefully that thread will be attended to again once v2 is released.