FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Open Forum To One Country Only
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Open Forum To One Country Only [message #183060 is a reply to message #183059] Sun, 06 October 2013 06:57 Go to previous messageGo to previous message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma:
Senior Member
Administrator
Core Developer
OK, one possible solution is to upload/ activate a plugin like this:
<?php
plugin_add_hook('PRE_REGISTER', 'plugin_canada');
function plugin_canada($uent) {
	if (file_get_contents('http://ipinfo.io/'. get_ip() .'/country') !== 'CA') {
		die('<h2>Sorry, we only allow registratiosns from users in Canada!</h2>');
	}
	return $uent;
}
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do I change the register page contents
Next Topic: Moderator for all forums?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 19 12:59:35 GMT 2024

Total time taken to generate the page: 0.10754 seconds