IP number & content access - Joomla! Forum - community, help and support


hi, wonder if 1 of recommend source of code, module, component solution followin problem. restrict access of sections of site given range of ip numbers. in other word, if visit site within range he/she see section diplayed public item, while outside range section not accessable.

thanks in advance.

kentaur wrote:hi, wonder if 1 of recommend source of code, module, component solution followin problem. restrict access of sections of site given range of ip numbers. in other word, if visit site within range he/she see section diplayed public item, while outside range section not accessable.

thanks in advance.


are sure mean ip , not country/region? not same thing. furthermore, component describe have dynamic ip address ranges/allocation change - depending on how accurate need be, wont matter much.

there free ip country database may help.
http://software77.net/cgi-bin/ip-country/geo-ip.pl

note: components/programs smf example, corrupt value of reported ip address overwriting feels 'best ip use'. instance, when connect site, connection may send several ip addresses, different variables in header, ie. if using caching or anonymising proxy (or visitors are)
granted, it's not common, i've had people supply fraudulent x_forwarded_for header impersonate user :(
the solution there tail log file see who's out , about

have given thought maintenance tangle may when have overlapping ip ranges 1 range demanding exclusion , other, inclusion?


anyway..

see post (hide content logged in/logged out users)
http://forum.joomla.org/index.php/topic ... #msg570025

then, see link
http://www.php.net/manual/en/function.checkdnsrr.php

maybe usefull, blacklist (dnsbl) check function:
for purposes, blacklist 'include list'
function is_blacklisted($ip) {
  $dnsbl_check=array("bl.spamcop.net",
                      "relays.osirusoft.com",
                      "list.dsbl.org",
                      "sbl.spamhaus.org");
  if ($ip) {
      $quads=explode(".",$ip);
      $rip=$quads[3].".".$quads[2].".".$quads[1].".".$quads[0];
      ($i=0; $i          if (checkdnsrr($rip.".".$dnsbl_check[$i],"a")) {
              $listed.=$dnsbl_check[$i]." ";
          }
        }
      if ($listed) { return $listed; } else { return false; }
  }
}
?>

then link ..scroll down here:match ip against network.

http://www.php.net/manual/en/function.ip2long.php

this should thing you..





Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support