Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Is IPAdress valid
- Checks if a IP adress has a valid format
- */
- // Sorry, currently I did not make a routine for IPv6,
- // but I'm sure you find one at: http://regexlib.com/
- function IsIPValid($ip){
- if (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $ip)){
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment