Here is a very simple Gideros usage, you'll need a Json lib for that
Save score:
local loader = UrlLoader.new("<a href="http://yoururl/score.php?action=insert&pass=dAS7M2qXT&app=testapp&game=level1points&username=ar2rsawseen&score=100000&type=json"" rel="nofollow">http://yoururl/score.php?action=insert&pass=dAS7M2qXT&app=testapp&game=level1points&username=ar2rsawseen&score=100000&type=json"</a><img class="emoji" src="http://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />
local function onComplete(event)
local response = Json.decode(event.data)
print(response.place)
end
loader:addEventListener(Event.COMPLETE, onComplete)
Get top:
local loader = UrlLoader.new("<a href="http://yoururl/score.php?action=top&pass=dAS7M2qXT&app=testapp&game=level1points"" rel="nofollow">http://yoururl/score.php?action=top&pass=dAS7M2qXT&app=testapp&game=level1points"</a><img class="emoji" src="http://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />
local function onComplete(event)
local response = Json.decode(event.data)
for i, val in response do
print(val.place.." - "..val.username)
end
end
loader:addEventListener(Event.COMPLETE, onComplete)
Comments
http://appcodingeasy.com/Mobile-Backend/Score-REST-API-on-PHP5-and-MySQL
Here is a very simple Gideros usage, you'll need a Json lib for that
Save score: