Skip to content
/ Lowell Public

Global premium rate phone number validation.

License

Notifications You must be signed in to change notification settings

waxim/Lowell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Lowell

Lowell is a PHP libary for checking if a give phone number is a premium rate or not. Premium rate numbers provide an attack vector by exploiting two-factor auth validation steps to generate the attacker money at your expense.

Example

$checker = new Lowell("en_GB");
$okay = $checker->check("118 118");

if(!$okay) {
  print "Sorry, that number is not valid";
} else {
  print "Yay. All good.";
}

If you like you can have Lowell throw an error if the number isn't okay.

try {
    $checker = new Lowell("en_GB");
    $number = $checker->checkOrFail("118 118");
    
    // do something with your number.
} catch(NumberNotValid) {
    print "Sorry, that number is not valid";
}

About

Global premium rate phone number validation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published