discuss AT lists.opennicproject.org
Subject: Discuss mailing list
List archive
- From: nanashiRei <nanashi.rei AT gmail.com>
- To: discuss AT lists.opennicproject.org
- Subject: Re: [opennic-discuss] The website
- Date: Thu, 13 Dec 2012 02:03:43 +0100
- Organization: YaS-Online
Am 13.12.2012 00:50, schrieb Alex Nordlund:
> Can't we make the data sane instead?
For the love of god:
It's web related? Use JSON, thank you.
Here a little example:
Request:
http://api.opennic.free/api/find-dns.json?by=location&countries=de,nl,fr&location=gps_cords_here
Reply:
{ "result": "success",
"dns": {
"servers": [
"123.123.123.123",
"45.67.89.10"
]
},
"timestamp": 123456789
}
With php you can digest this like this:
$apiResponse = json_parse($httpResponse);
And read values from it like:
echo $apiResponse->dns->servers[0];
//or
foreach($apiResponse->dns->servers as $dnsServer) {
echo $dnsServer;
}
If that's not easy and (in)sane, then i don't know :P
Keywords: RESTful, JSON, Caching, Controller, Routing
I may offer my help on this in i have plenty of experience with RESTful
APIs and JSON handling. Also i'm JS Ninja.
--
David "nanashiRei" Marner
Founder of YaS-Online.net
Service from Gamers, for Gamers.
PGP public key @ http://nanashirei.me/pgp
Commercial contact: nanashi.rei AT senshi.jp
Attachment:
signature.asc
Description: OpenPGP digital signature
- Re: [opennic-discuss] The website, (continued)
- Re: [opennic-discuss] The website, opennic, 12/12/2012
- Re: [opennic-discuss] The website, nanashiRei, 12/12/2012
- Re: [opennic-discuss] The website, opennic, 12/12/2012
- Re: [opennic-discuss] The website, Mauricio Pasquier Juan, 12/12/2012
- Re: [opennic-discuss] The website, Hunter 9999, 12/12/2012
- Re: [opennic-discuss] The website, Travis McCrea, 12/12/2012
- Re: [opennic-discuss] The website, Peter Green, 12/12/2012
- Re: [opennic-discuss] The website, Travis McCrea, 12/12/2012
- Re: [opennic-discuss] The website, Peter Green, 12/12/2012
- Re: [opennic-discuss] The website, Alex Nordlund, 12/12/2012
- Re: [opennic-discuss] The website, nanashiRei, 12/12/2012
- Re: [opennic-discuss] The website, Peter Green, 12/15/2012
- Re: [opennic-discuss] The website, Quinn Wood, 12/15/2012
- Re: [opennic-discuss] The website, nanashiRei, 12/15/2012
- Re: [opennic-discuss] The website, Aaron Angel, 12/16/2012
- Re: [opennic-discuss] The website, Peter Green, 12/16/2012
- Re: [opennic-discuss] The website, Brian Koontz, 12/16/2012
- Re: [opennic-discuss] The website, Quinn Wood, 12/16/2012
- Re: [opennic-discuss] The website, Tim Groeneveld, 12/16/2012
- Re: [opennic-discuss] The website, Quinn Wood, 12/16/2012
- Re: [opennic-discuss] The website, Richard Lyons, 12/16/2012
Archive powered by MHonArc 2.6.19.