我在 php 中通过 ip addresse 获取城市时遇到了一个大问题,代码昨天可以工作,但现在我收到一个错误:限制超出,我的代码:
public function getCityAndCountryByIp($ip){
//get the city
$tags = get_meta_tags('http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress='.$ip);
$result = $tags['city'];
return $result;
请帮帮我,代码可以更早地工作,请有任何建议