AddressCheck is a php script/function that check allowed hosts from a hosts.allow file.

hosts.allow format:
DENY:BAD.IP.ADDRESS
ALLOW:GOOD.IP.ADDRESS

hosts.allow entry example:

DENY:202.173.68.101/24
DENY:203.193.34.5/255.255.255.240
DENY:202.173.68.1

ALLOW:0.0.0.0/0.0.0.0

** the 'hostAllowed()' function will check from top to the last line, and if a match is found it returns 'true'

All you need to do is adding these lines in your php script:

    <?PHP
    
    include ("addresscheck.inc.php");
    if (!hostAllowed()) { die(); }

then edit the "hosts.allow.php" file (examples included)

AddressCheck is free to use and modify, so that you can use it properly. I only request:  
  - please respect other ppl's work
  - notice me via mail if you use it in your php program, and don't forget to include your program's name.
  - if you use it in your web, send me the URL.
  - if you find bugs or you have suggestions send me a mail to the address of below.  
  - again... please respect other ppl's work

I hope it serves you!!!

AddressCheck is made by Ronnie Indra Kurniawan
For suggestions use this address: phpdialer@yahoo.com
