【发布时间】:2013-11-16 19:25:12
【问题描述】:
我正在使用 MaxMind 的 GeoIP 服务:
<?php
include("geoip/geoip.inc");
include("geoip/geoipcity.inc");
include('geoip/geoipregionvars.php');
$gi = geoip_open("http://watchandrepeat.com/GeoLiteCity.dat", GEOIP_STANDARD);
?>
原来 geopi_open API 使用 fseek,它在我的网络服务器上失败了:
Warning: fseek() [function.fseek]: stream does not support seeking in /hsphere/local/home/yudaluz/watchandrepeat.com/geoip/geoip.inc on line 319
在撰写本文时,您可以在这里看到它失败了:http://watchandrepeat.com/indextest.php
我正在使用 IxWebHosting,我询问了他们的客户支持是否可以在他们的 apache 服务器上打开流搜索,因为它在我的本地主机上运行良好。他们这样说: "很抱歉,在我们的共享服务器上无法开启这样的功能。我建议您使用我们的 VPS 或云托管方案。您将可以根据需要配置自己的服务器。"
有什么解决办法吗?
【问题讨论】:
-
我是认真的,我真的需要一个特殊的托管服务来读取文件吗?
-
我也厌倦了 GEOIP_SHARED_MEMORY 模式或 GEOIP_MEMORY_CACHE 模式作为 geoip_open 的选项标志 - 但这些并没有多大帮助。
标签: php database geoip fseek maxmind