if (isset($_GET["tp"])){$tp=$_GET["tp"];} else {$tp="demo";} $json = trim(stripslashes(file_get_contents("https://easylike.net/api/api_easywc.php?func=getplaceaddress&tp=".$tp))); $json = str_replace("\xEF\xBB\xBF",'',$json); // избавимся от BOM $data = json_decode($json, true); //print_r($data); $address = $data[0]["address"]; if ($address=='---'){$address='.---';} ?>