WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. razdrak
    Member
    Posted 2 years 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 ?

  2. razdrak
    Member
    Posted 2 years 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]);
    }

  3. razdrak
    Member
    Posted 2 years ago #

    Any ideas anyone ?

Topic Closed

This topic has been closed to new replies.

About this Topic