Maxmind geolocation apis: Apache vs PHP

蓝咒 提交于 2019-12-11 03:49:46

问题


I am looking to implement a very basic country limiting on my site based on the Maxmind geoip database (free version). Basically, I want to limit all users of the site to one country only. What I'm wondering is: is there any performance gain using the Apache API versus the PHP API?

I want to be able to use the country code for more than just a simple redirect (display messages in different languages, etc.), so that's why I'm leaning toward PHP, but my number one concern is the impact on performance.

Thanks for any advice.


回答1:


The main advantage with the apache API is that PHP is never invoked (unless you then redirect to a PHP page).

So the decision is made sooner, and you have more control over whether it affects your performance or not.

Other than that, there's not too much difference.

-Adam



来源:https://stackoverflow.com/questions/593401/maxmind-geolocation-apis-apache-vs-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!