Hello! Can you please tell me how to parse the values of the json file that is wrapped in a callback?
I get the value like this:
$json = file_get_contents('https://geoip-db.com/jsonp/00.000.00.00'); $data = json_decode($json); The resulting value itself:
callback({"country_code":"RU","country_name":"COUNTRY","city":"CITY","postal":null,"latitude":00.0000,"longitude":00.0000,"IPv4":"00.000.00.00","state":" REGION'"}) Only country_name, city, state are needed