1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-31 05:37:59 +01:00

Merge pull request #5998 from 3D-I/ticket/16508

[ticket/16508] Fix WhoIs lookup
This commit is contained in:
Marc Alexander 2020-06-07 09:23:58 +02:00
commit de834b65e8
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -1470,13 +1470,11 @@ function user_ipwhois($ip)
$ipwhois = '';
// Limit the query to all possible flags (whois.arin.net)
$ip = 'z ' . $ip;
if (($fsk = @fsockopen($whois_host, 43)))
{
// CRLF as per RFC3912
fputs($fsk, "$ip\r\n");
// Z to limit the query to all possible flags (whois.arin.net)
fputs($fsk, "z $ip\r\n");
while (!feof($fsk))
{
$ipwhois .= fgets($fsk, 1024);