$res){ echo "~ " .$result. " :: ".$res."\r\n"; } // You can also use the below method /* // {"ip":"66.85.139.244","hostname":"node244.dualstartnetworks.com","city":"Phoenix, Arizona","zip":"85001","country":"United States","countryCode":"US","location":"33.4484,-112.074","timezone":"-07:00","vpn_user":"yes"} // this is just an example of my API shit. $res = json_decode($results, true); echo "IP: ".$res['ip']."\r\n"; echo "Hostname: ".$res['hostname']."\r\n"; echo "City: ".$res['city']."\r\n"; echo "Zip Code: ".$res['zip']."\r\n"; echo "Country: ".$res['country']."\r\n"; echo "Country Code: ".$res['countryCode']."\r\n"; echo "Location[lat/long]: "$res['location']."\r\n"; echo "Time Zone: ".$res['timezone']."\r\n"; echo "VPN User?: ".$res['vpn_user']."\r\n"; //this is my favorite part here, my API can track if he's/she's using an Proxy/VPN */ ?>