previousConverts an IP address to a PHP double. (Previous) (Next) Validate the syntax of the given netmask.next

View this page in Last updated: Sun, 07 Feb 2010
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_IPv4::validateIP()

Net_IPv4::validateIP() – Validate the syntax of the given IP adress.

Synopsis

require_once 'Net/IPv4.php';

bool validateIP ( string $ip_addr )

Description

Validates the syntax of an IP address in dot-quad format. Returns true if address is valid, false if not.

Note

This function can be called statically.

previousConverts an IP address to a PHP double. (Previous) (Next) Validate the syntax of the given netmask.next

Download Documentation Last updated: Sun, 07 Feb 2010
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: kguest
remembering this function is a method of the Net_IPv4 class, the simplest example of using this is:

<?php
require_once("Net/IPv4.php");

$valid_ip Net_IPv4::validateIP($ip_address);
?>