I can't seem to find the GET object anywhere, if it comes with MMF2, it doesn't appear in the compatible apps for iOS, but I've seen iOS runtime users using it... I've searched Google and the forum and I can't seem to find the thing. Any help?
Printable View
I can't seem to find the GET object anywhere, if it comes with MMF2, it doesn't appear in the compatible apps for iOS, but I've seen iOS runtime users using it... I've searched Google and the forum and I can't seem to find the thing. Any help?
It really did take a bit of hunting through about ten threads with the title "Get object" to find it - here it is!
http://www.aquadasoft.com/Get.zip
Thanks!
Need to find some examples now...
Get is really simple to work with...
You provide a fully qualified URL when you do the get call then check for the response. Couldn't be easier!
How do I actually retrieve and manage the data though?
• On Get Complete
set a global string = Received$( "Get object" )
Then you can parse the data however you wish...
This may be overkill, but any time i'm doing more than one Get call, I create the get object, do the get, set the data to a variable and destroy the get object.
I do this because I was having issues... sometimes the get didn't seem to return. When i started doing this, my failed gets went away
Ah interesting, thanks for the tip! So the GET object retrieves everything as one string and we can then explode and interpret it accordingly. What kind of data is it reading? XML?
Whatever is returned by the Get. If you do a Get on a URL that is a web page, it returns the entire contents of the HTML, exacty what the browser would receive.
If the return is a single word, then that's what you're going to find in the string.
Thanks, that's perfect! Sorry for all the questions!
OK I totally get it now, it essentially retrieves an entire web page based on the URL, and I'm guessing I can use PHP along with URL parameters to actually add to a database too, since it has to run the PHP to retrieve the HTML. I'm looking at "Set POST data", which could be better than using URL parameters, to mimmick a sent form, but due to a lack of documentation I don't know what format I need to send the POST data in, how to separate the strings etc.
No worries, we're all here to help each other... glad I could help!
I get it now, the POST data asks for two expressions, the first being the key and the second being the value, and I can submit it straight to the $_POST[]; array, as if through a form. Very nice indeed!
Sorry, when i last posted, I thought you had already figured it out. I'm glad you figured it out now.
Im hoping to implement something like this to collect stats from my iOS game. I want to determine the difficulty of levels so I can refine the game for playability.
If the GET fails for any reason, will it interrupt the application? Im looking around for a free web host to keep things simple...
If the GET fails, it shouldn't cause any side effects unless your game is specifically waiting on, or needs the data from the GET...
I've also written a simple GET function to send stats to my site where a little PGP will write the stats to a database. I did this for my game GeoSwarm to send high scores to a simple High Scores table.
Anybody know how much can be downloaded to the GET object maximum? If possible I'd like to download my entire database and store it in the app for when offline.
Sorry DJ, I don't know the limits... how much data are you wanting to download?
Potentially entire databases XD
But I guess it's only text!
I guess my real question is, how much data is in the database?
Only time will tell that one, I'll just have to keep testing!
I got my tracking script working today, mostly thanks to the advice in this post. Thanks guys!
At the end of each level, my game now sends the level play time and various scores to a php script. At the backend, Im logging it all so I can improve my levels over time.
I decided to also log and report the framerate, which may be useful to find bugs. Is there any way to extract information on the device that the app is being run on? I don't see anything relevant in the iOS object.
Yeah I don't think this is currently available (otherwise we'd all be able to reformat our controls for iPad etc.) but it might be something the team could implement if we all request it enough. As soon as I get the time I'm getting into extension development so I will take a look too.