I like to add some personal touches to a welcome image on our mediawiki site, and have the welcome be displayed in the, presumed, language of the visitor.
Standard would be English, but if the IP or browser or OS is set to be in India, I want to display the message in Urdu for example... Or if South Afrika than I want the SA Afrikaans image to show.
Anyone have some idea on how to accomplish this using simple code?
Just place the 'geoip.inc' file somewhere according to the 'include_path' directive of
your 'php.ini' file, or just place it in the same directory as your PHP scripts.
Memory Caching:
To enable memory caching, pass GEOIP_SHARED_MEMORY or
GEOIP_MEMORY_CACHE to the second argument of geoip_open
For GEOIP_SHARED_MEMORY, requires php >= 4.0.4,
and --enable-shmop passed at configure time, see http://us2.php.net/manual/en/ref.shmop.php
In addition, you should call geoip_load_shared_mem
before calling geoip_open. See sample_city.php for an
example of shared memory caching.
Working with PHP5.
geoip_country_code_by_addr should work
with PHP.