(52 replies, posted in PunBB 1.3 extensions)

Version 1.1 is up, with a fix for the email notifications and the ability to submit evidence when reporting spammers. Additional feedback welcome.


(52 replies, posted in PunBB 1.3 extensions)

Just realized there is an issue where blocked registration notification emails don't always get sent.  I'll have an update to fix this soon.


(52 replies, posted in PunBB 1.3 extensions)

(Not to be confused with the StopForumSpam.com Antispam extension.)

This extension will block registrations from known spammers listed in the StopForumSpam database. It includes a settings page for entering your StopForumSpam API key, as well as options for using a DNSBL (DNS blackhole list), custom block message, and email notification for blocked registrations. There is also an option to report spammers to the StopForumSpam database when deleting them. See screenshots below.


  • ver 1.4 Bug fixes and small tweaks. (NOTE: If upgrading from 1.3, you will need to rename the `registered` column in the sfs_antispam table to `added`. Or if you prefer, you can uninstall 1.3 before installing 1.4.)

  • ver 1.3 Now caches blocked and reported spammers locally to reduce lookups. Auto-populates evidence from users signature, website, and last post (can still be edited before submitting). Other miscellaneous bug fixes and code cleanup.

  • ver 1.2 Changed hook priorities so that spammer check occurs after all other registration validation passes (e.g.  CAPTCHA validations)

  • ver 1.1 Email notifications fix, and added ability to submit evidence when reporting spammers (updated screenshot below)

  • ver 1.0 Initial release



Settings page

Blocked spammers list

Report spammer when deleting


(20 replies, posted in PunBB 1.3 extensions)

cirle78 wrote:

I am un big probem where IP Geo in 1.2 and PunBB in 1.3.2 :

Notice: unserialize() [function.unserialize]: Argument is not a string in /mnt/126/free.fr/0/2/7iemecie/forum/include/common.php(129) : eval()'d code on line 135

I guess this could happen if your server is unable to retrieve the geolocation data from geoplugin.net. You might need to troubleshoot by doing some tests with the punbb get_remote_file() function, perhaps adjusting the timeout (the plugin uses a timeout of 8 seconds, which should be more than enough).


$geoplugin_response = get_remote_file('http://www.geoplugin.net/php.gp',8);

That should shed some light on what is going on with your server.


(20 replies, posted in PunBB 1.3 extensions)

Version 1.2 available. This version displays a "Geolocate" link which allows you to populate the geolocation for preexisting users.


(20 replies, posted in PunBB 1.3 extensions)

Ok, version 1.1 is available (see my original post above for download). This version uses PunBB's built in get_remote_file() function as Parpalak suggested. Suggestions and other feedback welcome.


(20 replies, posted in PunBB 1.3 extensions)

Parpalak wrote:

Actually, PunBB has the get_remote_file(...) function. It uses curl or sockets if enabled.

You may use this function in your extensions.

Wow, thanks Parpalak, that is great to know. I was about to write a fsockopen() implementation to fall back on, but you just saved me the trouble!


(20 replies, posted in PunBB 1.3 extensions)

No, the code for using cURL will not be as simple as a function call. I think I'm actually going to update the extension to use the GeoPlugin PHP class, which will handle the cURL and file_get_contents() checking, and should simplify the extension code a bit.

In the meantime, if you simply want to get the current extension working with cURL, you can do the following:


$geo_location = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$user_info['registration_ip']));


$geoplugin_host = 'http://www.geoplugin.net/php.gp?ip='.$user_info['registration_ip'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $geoplugin_host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$geo_response = curl_exec($ch);
curl_close ($ch);

$geo_location = unserialize($geo_response);


(20 replies, posted in PunBB 1.3 extensions)

KeyDog wrote:

EDIT: guess my host has this PHP function called Http wrapper disabled... any workaround?

Can you check if your host allows cURL? I can make the extension check for either file_get_contents support or cURL support, and use whichever is available.

You can test for both of these functions like this:

if ( function_exists('curl_init')) {
   echo('cURL supported');
} else if ( ini_get('allow_url_fopen')) {
   echo('file_get_contents supported');
} else {
   echo('Neither cURL or file_get_contents supported. Sorry.');


(20 replies, posted in PunBB 1.3 extensions)

This extension will display the geographic location of users on their profile to administrators. It determines the geographic location based on the users IP address, using the free geoPlugin web service.


  • ver 1.3 "maxtestedon" updated to 1.3.6 (no other changes).

  • ver 1.2 "Geolocate" link to fetch geolocation of users who registered before the extension was installed.

  • ver 1.1 Uses cURL if available, and includes some other small improvements.

  • ver 1.0 Initial release


Profile of user before geolocation has been fetched

Profile of user after geolocating