Plugin Directory

Changeset 2091294


Ignore:
Timestamp:
05/20/2019 09:41:56 AM (7 years ago)
Author:
daniel1088
Message:

modify api default timeout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pixnet/trunk/pixnet_plugin.php

    r2053750 r2091294  
    44Description: This is PIXNET PA code Wordpress plugin
    55Author: Daniel
    6 Version: 2.7.3
     6Version: 2.7.4
    77*/
    88
     
    2424        // Retry three times
    2525        for ($i=0; $i<3; $i++) {
    26             $result = wp_remote_get('https://api-smartranking.pixplug.in/api/personalrank?domain=' . $this->plugin->site_url .'/');
     26            $result = wp_remote_get('https://api-smartranking.pixplug.in/api/personalrank?domain=' . $this->plugin->site_url .'/', array('timeout' => 1));
    2727            if (is_wp_error($result)) {
    2828                $this->is_onrank = false;
     
    9494        // Retry three times
    9595        for ($i=0; $i<3; $i++) {
    96             $result = wp_remote_get('https://rhino-api.pixinsight.com.tw/wordpress/getpixstar?domain=' . $domain);
     96            $result = wp_remote_get('https://rhino-api.pixinsight.com.tw/wordpress/getpixstar?domain=' . $domain, array('timeout' => 1));
    9797            if (is_wp_error($result)) {
    9898                continue;
     
    191191        }
    192192       
    193         $result = wp_remote_get('https://rhino-api.pixinsight.com.tw/wordpress/searchconsole?domain=' . $this->plugin->site_url .'/');
     193        $result = wp_remote_get('https://rhino-api.pixinsight.com.tw/wordpress/searchconsole?domain=' . $this->plugin->site_url .'/', array('timeout' => 1));
    194194
    195195        if (is_wp_error($result)) {
Note: See TracChangeset for help on using the changeset viewer.