Skip to content

Commit 59d9294

Browse files
authored
change to mt_rand
1 parent 4b119a9 commit 59d9294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GeoIP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function getIp()
7373
{
7474
if (! $this->ip) {
7575
if ($this->random) {
76-
$this->ip = long2ip(rand(0, '4294967295'));
76+
$this->ip = long2ip(mt_rand(0, 4294967295));
7777
} else {
7878
$this->ip = array_get($_SERVER, 'HTTP_CLIENT_IP', array_get($_SERVER, 'HTTP_X_FORWARDED_FOR', array_get($_SERVER, 'HTTP_X_FORWARDED', array_get($_SERVER, 'HTTP_FORWARDED_FOR', array_get($_SERVER, 'HTTP_FORWARDED', array_get($_SERVER, 'REMOTE_ADDR', '127.0.0.1'))))));
7979
}

0 commit comments

Comments
 (0)