I want to find a way to generate some random IP Addresses.
Just for testing my user database.
The function below works as far I can see.
But I wonder if there is some shorter, smart way to do this?
I am sure it is
<?php
function make_ip(){
$inum1 = rand(0,255);
$inum2 = rand(0,255);
$inum3 = rand(0,255);
$inum4 = rand(0,255);
$ip = $inum1.'.'.$inum2.'.'.$inum3.'.'.$inum4;
return $ip;
}
echo make_ip();
?>