Generate Random IP address using PHP

numbers, php

Solution

Check the mt_rand func .

You'll probably want to run this :

<?php
    $randIP = mt_rand(0, 255) . "." . mt_rand(0, 255) . "." . mt_rand(0, 255) . "." . mt_rand(0, 255);
?>

Problem

I would like to generate a random IP adress.

Original source