Location: PHPKode > projects > gframe > gframe/string.php
<?PHP

function is_ip ($ip) 
{
	// Code contributed by mel, found at:  http://de3.php.net/ereg
	
    if (ereg('^([0-9]{1,2}|[01][0-9]{2}|2[0-4][0-9]|25[0-5])\.([0-9]{1,2}|[01][0-9]{2}|2[0-4][0-9]|25[0-5])\.([0-9]{1,2}|[01][0-9]{2}|2[0-4][0-9]|25[0-5])\.([0-9]{1,2}|[01][0-9]{2}|2[0-4][0-9]|25[0-5])$', $ip)) 
     return true; 
    else
     return false; 
} 

function str_to_html ($text)
{
	str_replace("\n", "<br>", $text);
	
	return $text;
}

function is_num ($number) 
{
	// Code forked from above :)
	
    if (ereg('^[0-9]+', $number)) 
     return true; 
    else
     return false; 
}


?>
Return current item: gframe