0

usually we will see json in this format

{"query":"google.com","domain":"google.com","domain_idna":"google.com","host":"","subdomain":"google.com"}

and then to decoder we will use

                 $server = $server_url_for_requests_json_response;
                 $json = @file_get_contents($server, true);
                 $decode = json_decode($json, true);
                 $domain_idna = $decode[domain_idna];

and then we will get $domain_idna = google.com;

but now i get this json format ( that i never seen. )

{"status":"success","domain":"google.com","available":false}

i want to get /// available /// how can i decoder

to get this json click here http://freedomainapi.com/?key=3xhebruryp&domain=google.com

robert
  • 45
  • 4
  • 1
    What exactly is the problem? Is it the `false` that's confusing you? – NPE Sep 19 '13 at 11:05
  • see {"status":"success","domain":"google.com","available":false} object available , false not have " " – robert Sep 19 '13 at 11:14
  • Both are valid JSON. Read up on JSON here: http://en.wikipedia.org/wiki/JSON – NPE Sep 19 '13 at 15:00
  • can you decode {"status":"success","domain":"google.com","available":false} and get available value – robert Sep 19 '13 at 15:54

0 Answers0