We've modded punBB to show the country of the poster, using our IP-to-country tool. We added these 16 lines of code after line 201 in viewtopic.php:
// IP to country start
require_once( '/path/to/ip2c.php' );
if ( !empty( $cur_post['poster_ip'] ) )
{
$ipc = new ip2country();
$ipc->init( '/path/to/ip2cntry.dat' );
$idx = $ipc->lookup( $cur_post['poster_ip'] );
if ( $idx != IP2C_IP_NOT_FOUND )
{
$ccode = $ipc->idx2country( $idx );
$user_info[] = '<dd><img src="/path/to/flags/' .
strtolower( $ccode ) . '.gif" style="width: 16px; height: 12px;" alt="' .
$ccode . '" />';
}
unset( $ipc );
}
// IP to country stop