WordPress.org

Support

Support » How-To and Troubleshooting » Warning: fsockopen() [function.fsockopen] on Webmasters Tools

Warning: fsockopen() [function.fsockopen] on Webmasters Tools

  • 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 ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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]);
    }

    Any ideas anyone ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: fsockopen() [function.fsockopen] on Webmasters Tools’ is closed to new replies.
Skip to toolbar