mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16508] Fix WhoIs lookup
PHPBB3-16508
This commit is contained in:
parent
73c133c91d
commit
f8acf53f72
1 changed files with 1 additions and 7 deletions
|
@ -1470,16 +1470,10 @@ function user_ipwhois($ip)
|
||||||
|
|
||||||
$ipwhois = '';
|
$ipwhois = '';
|
||||||
|
|
||||||
if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
|
||||||
{
|
|
||||||
// Limit the query to all possible flags (whois.arin.net)
|
|
||||||
$ip = 'z ' . $ip;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($fsk = @fsockopen($whois_host, 43)))
|
if (($fsk = @fsockopen($whois_host, 43)))
|
||||||
{
|
{
|
||||||
// CRLF as per RFC3912
|
// CRLF as per RFC3912
|
||||||
fputs($fsk, "$ip\r\n");
|
fputs($fsk, "z $ip\r\n");
|
||||||
while (!feof($fsk))
|
while (!feof($fsk))
|
||||||
{
|
{
|
||||||
$ipwhois .= fgets($fsk, 1024);
|
$ipwhois .= fgets($fsk, 1024);
|
||||||
|
|
Loading…
Add table
Reference in a new issue