Country-Specific Content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Terriator
Forum Commoner
Posts: 60
Joined: Mon Jul 04, 2005 12:46 pm

Country-Specific Content

Post 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?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Country-Specific Content

Post by John Cartwright »

That certainly depends on geoip_country_name_by_name() does
Terriator
Forum Commoner
Posts: 60
Joined: Mon Jul 04, 2005 12:46 pm

Re: Country-Specific Content

Post by Terriator »

Hmmm, I just found the function in the manual:

http://www.nusphere.com/kb/phpmanual/fu ... y-name.htm
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Country-Specific Content

Post 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.
Post Reply