ip2long function help
Posted: Wed Dec 15, 2010 1:38 am
it does not echo the ip conversions. I tried without ip2long functino , it worked fine
Code: Select all
<form method="post" action="test.php">
<textarea name="new" cols="40" rows="10">
samplehost-1,127.0.0.1
samplehost-2,127.0.0.2
</textarea><br>
<input type="submit" value="Add Servers">
</form>
<?phpif(isset($_POST['new'])) {
$array= explode("\n",$_POST['new']);
foreach ($array as $ni) {
$array=explode(',', $ni);
echo ip2long($array[1]);
}
}
?>