$p .= ")\$/i"; $r = preg_match($p, $mail) ? 1 : 0; } return $r; } function cek_ip($check) { $bytes = explode('.', $check); if (count($bytes) == 4 or count($bytes) == 6) { $returnValue = true; foreach ($bytes as $byte) { if (!(is_numeric($byte) && $byte >= 0 && $byte <= 255)) { $returnValue = false; } } return $returnValue;
<?php