If you are interested, here is the code:
Here is how you use it:
global $gCms;
if( isset($params['ipcheck']) && $params['ipcheck'] ) {
$ipnum = isset($params['maxnumip'])?$params['maxnumip']:3;
$db =& $this->GetDb();
$module =& $this->GetModuleInstance('FrontEndUsers');
if( !$module ) return FALSE;
$uid = $module->LoggedInId();
$sql = "SELECT distinct(ipaddress) FROM ".cms_db_prefix()."module_feusers_history
WHERE userid =" . $uid . " AND ipaddress IS NOT NULL";
$dbresult = &$db->Execute($sql);
while( $dbresult && $row = $dbresult->FetchRow()) {
$data[] = $row;
}
if( count($data) > $ipnum ) {
$url = !empty($params['errorpage'])?$params['errorpage']:" http://localhost:90/cms/index.php?page=How-CMSMS-Works";
header("Location:" . $url);
exit();
}
}
{cms_module module=CustomContent ipcheck=1 maxnumip=4 errorpage=http://google.com}
eMail me if you would like the whole CustomContent.module.php file
John