razdrak
Member
Posted 4 months ago #
Hello,
I found my slf with a bunch of these errors :
Warning: fsockopen() [function.fsockopen]: unable to connect to udp://whois.happyarts.net:8000 (Permission denied) in /hermes/bosweb26d/b2047/ipw.razbetco/public_html/wp-content/plugins/wp-shortstat.php on line 124
Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /hermes/bosweb26d/b2047/ipw.razbetco/public_html/wp-content/plugins/wp-shortstat.php on line 125
THis seems to be related to WP Shortstat plugin .
How can I fix this ?
razdrak
Member
Posted 4 months ago #
And this is what I found in the shortsstat.php file related to fsockopen :
function determineCountry($ip) {
$fp = fsockopen("udp://whois.happyarts.net", 8000, $errno, $errstr, 2);
stream_set_timeout($fp, 2);
if (($fp) && (fwrite($fp, $ip) != false))
{
$country = fread($fp, 200);
}
/* disabled fallback, because script is not running anymore
else
{
$coinfo = @file('http://whois.happyarts.net/ip2country.php?ip=' . $ip);
$country = trim($coinfo[0]);
}
razdrak
Member
Posted 4 months ago #