Jump to content

importing JSON feed


shedokan

Recommended Posts

I have this JSON feed:

{"generated": "2008-08-19T12:30:33.000217", "games": [{"rating": "Everyone", "updated": "2008-08-18", "popularity": null, "description": "Mitten is avoiding arrows that fall out of the sky! Why are there arrows falling out of the sky? Heck knows :S ( Wait until Mitten 5 is released, and maybe you'll live long enough to find out  )\r\nDon't worry, Mitten never gets really badly hurt - luck of the Irish 'n all", "key_mappings": "", "height": 700, "game_url": "http://minaturecookie.deviantart.com/art/Mitten-94306548", "slug": "mixel", "tags": ["cat", "mitten", "arrows", "falling", "avoid", "time", "score", "beat", "addictive", "awesome", "cool", "game"], "instructions": "Use the arrow keys to avoid the falling arrows, and the up arrow to jump the mad man carrying arrows he found on the floor.\r\nTry and get the biggest score you can! But most of all, have fun! ", "uuid": "2f077861-d218-32bf-867d-fdf1fa25a85d", "author": "MinatureCookie", "control_scheme": "{\"fire\": \"na\", \"jump\": \"up\", \"movement\": \"arrow\"}", "author_link": "http://mochiads.com/community/profile/MinatureCookie", "feed_approval_created": "2008-08-18T15:32:24.132976-08:00", "name": "Mitten", "swf_url": "http://games.mochiads.com/c/g/mixel/Mitten.swf", "recommended": false, "thumbnail_url": "http://cdn.mochiads.com/c/g/mixel/_thumb_100x100.png", "created": "2008-08-18T11:47:22.784729-08:00", "categories": ["Action", "Other"], "game_tag": "065c18c7ff0e8671", "leaderboard_enabled": true, "zip_url": "http://cdn.mochiads.com/c/g/mixel.zip", "width": 400}]}

which I'm trying to make all those variables php variables, what is the best way to do this?

thanks.

Link to comment
https://forums.phpfreaks.com/topic/120458-importing-json-feed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.