开发者

Pull data from FB app and store in spreadsheet

I am hoping you guys can help me out. I play a Facebook game called Dragons of Atlantis. It is a Real-Time Strategy game with a large world map. The world map is a 750x750 grid. I'd like to know the details of each coordinate of that grid, as unfortunately, there is no in-game way to view this data. Not directly, at least...

There is a JSON file which supplies the app with partial amounts of map data (data correlating to a 20x20 grid on the world map). I want to use that JSON file to store those results in a spreadsheet so I have my own record of map details I can view locally and on a whim.

Here is an example of one of the JSON files containing map data: http://realm3.castle.wonderhill.com/api/map.json

I'll be the first to admit I hardly have any programming knowledge. I'm a SQL expert, but that knowledge seems to be getting me absolutely no where in this endeavor... :(

Any tools you guys know of which would help me achieve my ends? I don't think what I'm asking for it all that uncommon or complicated, but I cannot find a solution for the life of me.

开发者_JAVA百科

Any help is greatly appreciated.


Hopefully the code below will get you started. Basically $jsonurl is the URL you want to call to get the map data. $json actually gets data. $json_output turns it into an array. You can then work with those arrays to insert that data into MySQL:

$jsonurl = "http://realm" . strval($realm['intRealmID']) . "." . $realm['strRealmServer'] .".castle.wonderhill.com/api/map.json?x=" . $x . "&y=" . $y . "%26timestamp=" . time() . "&_session_id=INSERTYOURSESSIONIDHERE5";
$json = file_get_contents($jsonurl,0,null,null);    
$json_output = json_decode($json,true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜