I've done some research about sockets but I'm not sure how I would use it or even if I should.
Keep in mind that this code gives succesful results most of the time, but takes too long to time out if the results come back empty.
Anywho, here's my code inside my loop that provides the latitude and longitude for my map:
Code: Select all
$results[$i]=file_get_contents("http://www.hostip.info/api/get.html?ip=$ip&position=true");
preg_match('/Latitude: (.*)/', $results[$i], $lat);
preg_match('/Longitude: (.*)/', $results[$i], $lon);Any ideas?