check_server_ip_connectivity example

$debug = array();
        $debug[ 'PHP_VERSION' ]         = PHP_VERSION;
        $debug[ 'WORDPRESS_VERSION' ]   = $GLOBALS['wp_version'];
        $debug[ 'AKISMET_VERSION' ]     = AKISMET_VERSION;
        $debug[ 'AKISMET__PLUGIN_DIR' ] = AKISMET__PLUGIN_DIR;
        $debug[ 'SITE_URL' ]            = site_url();
        $debug[ 'HOME_URL' ]            = home_url();
        
        $servers = get_option('akismet_available_servers');
        if ( (time() - get_option('akismet_connectivity_time') < $cache_timeout) && $servers !== false ) {
            $servers = self::check_server_ip_connectivity();
            update_option('akismet_available_servers', $servers);
            update_option('akismet_connectivity_time', time());
        }

        if ( wp_http_supports( array( 'ssl' ) ) ) {
            $response = wp_remote_get( 'https://rest.akismet.com/1.1/test' );
        }
        else {
            $response = wp_remote_get( 'http://rest.akismet.com/1.1/test' );
        }

        
Home | Imprint | This part of the site doesn't use cookies.