Page 1 of 1

Country-Specific Content

Posted: Mon Apr 14, 2008 10:23 am
by Terriator
Hey,

I'm in need of showing specific ads to users from specific countries, and I was intending to use following function to determine the country of a given user: geoip_country_name_by_name().

The question is; will running this function on each pageload result in any significant draining of my server resources?

Re: Country-Specific Content

Posted: Mon Apr 14, 2008 10:25 am
by John Cartwright
That certainly depends on geoip_country_name_by_name() does

Re: Country-Specific Content

Posted: Mon Apr 14, 2008 10:33 am
by Terriator
Hmmm, I just found the function in the manual:

http://www.nusphere.com/kb/phpmanual/fu ... y-name.htm

Re: Country-Specific Content

Posted: Mon Apr 14, 2008 10:39 am
by John Cartwright
Terriator wrote:Hmmm, I just found the function in the manual:

http://www.nusphere.com/kb/phpmanual/fu ... y-name.htm
Ah yes, this is a native php function. My mistake.