<?php mt_rand(): int
<?php $errno = 0; $errstr = ''; for ($i = 0; $i < 20 && $errno !== $enetunreach; ++$i) { $address = 'tcp://192.168.' . mt_rand(0, 255) . '.' . mt_rand(1, 254) . ':8123'; $client = @stream_socket_client($address, $errno, $errstr, 0.1 * $i); } if ($client || $errno !== $enetunreach) {