PunMarks

Topic: IP to Country script

I slightly modified a free IP to country php script to display each visitor's own national flag to them.

If it is working correctly, you should see your country's flag displayed below:

http://fixpc.co.za/iplocator/flag.php

To show visitors to your web page their own flags, use the appropriate code:

HTML

<a target=_blank href=http://fixpc.co.za/topic/1253/ip-to-country-script/>
<img alt="your flag?" src="http://fixpc.co.za/iplocator/flag.php" height="15" width="21" /></a>

BBCode

[url=http://fixpc.co.za/topic/1253/ip-to-country-script/][img]http://fixpc.co.za/iplocator/flag.php[/img][/url]

Let me know if there are any bugs wink

Re: IP to Country script

PunBB Extensions

Based on this script, I've created PunBB extensions:

ip_to_country
Loads the function iptocountry() which converts an IP address into a two letter country code. Required for all those which will follow.
Download this updated IP database first

member_flags
Displays member's flags below their sig after every post.

Re: IP to Country script

Geo-Banners

Based on the above, I've created a geographically targeting php banner script that will display different banners to visitors from different countries.

Download this updated IP database first

Then download:

geo_banners.zip

Edit the php files in geo_banners/banners to include your banners. Banners are named by their two letter country code. For example, South Africans will see ZA.php. If a country code is not included the script will display default.php

Online Demo