previousNet_IPv4::ip2double() (Previous) (Next) Net_IPv4::validateNetmask()next

View this page in Last updated: Sun, 05 Jul 2009
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.

previousNet_IPv4::ip2double() (Previous) (Next) Net_IPv4::validateNetmask()next

Download Documentation Last updated: Sun, 05 Jul 2009
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);
?>