How to limit http response time in php
I’m using some sites to detect my site visitor’s country. I mean like this
$ip = $_SERVER['REMOTE_ADDR'];
$url1 = 'http://api.hostip.info/get_json.php?ip='.$ip;
$url2 = 'http://ip2country.sourceforge.net/ip2c.php?format=JSON&ip='.$ip;
Sometimes sites like sourgeforge taking too much time to load.
So can anyone tell how to limit the http response time.?
if url1 is down or not responded in x seconds then move to url2,url3,etc
Total Views: 13 Today Views: 0














