[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/bundled-libs/Net/ -> CheckIP.php (sommaire)

(pas de description)

Poids: 75 lignes (2 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Net_CheckIP:: (1 méthode):
  check_ip()


Classe: Net_CheckIP  - X-Ref

Class to validate the syntax of IPv4 adresses

Usage:
<?php
require_once "Net/CheckIP.php";

if (Net_CheckIP::check_ip("your_ip_goes_here")) {
// Syntax of the IP is ok
}
?>

check_ip($ip)   X-Ref
Validate the syntax of the given IP adress

This function splits the IP address in 4 pieces
(separated by ".") and checks for each piece
if it's an integer value between 0 and 255.
If all 4 parameters pass this test, the function
returns true.

param: string $ip IP adress
return: bool       true if syntax is valid, otherwise false



Généré le : Sat Nov 24 09:00:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics