title: Operation timed out after 20001 milliseconds with 0 bytes received (The Best Spinner API)
body: <p>I have a problem with The Best API when running this at my server i am getting this error</p>
  
  <p>Request Timeout</p>
  
  <p>This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'. </p>
  
  <p>Even i am using this set_time_limit(0);</p>
  
  <p>and Spinner is not return any spinned content.</p>
  
  <p>Here is what i am using:</p>
  
  <pre><code>&lt;?php
  function curl_post($url, $data, &amp;$info){
  
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, curl_postData($data));
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_REFERER, $url);
    $html = trim(curl_exec($ch));
    curl_close($ch);
  
    return $html;
  }
  
  function curl_postData($data){
  
    $fdata = "";
    foreach($data as $key =&gt; $val){
      $fdata .= "$key=" . urlencode($val) . "&amp;";
    }
  
    return $fdata;
  
  
  
   }
  
     set_time_limit(0);    
  $url = 'http://thebestspinner.com/api.php';
  
  #$testmethod = 'identifySynonyms';
  $testmethod = 'replaceEveryonesFavorites';
  
  
  # Build the data array for authenticating.
  
  $data = array();
  $data['action'] = 'authenticate';
  $data['format'] = 'php'; # You can also specify 'xml' as the format.
  
  # The user credentials should change for each UAW user with a TBS account.
  
  $data['username'] = 'your@useremail.com';
  $data['password'] = 'password';
  
  # Authenticate and get back the session id.
  # You only need to authenticate once per session.
  # A session is good for 24 hours.
  $output = unserialize(curl_post($url, $data, $info));
  
  if($output['success']=='true'){
    # Success.
    $session = $output['session'];
  
    # Build the data array for the example.
    $data = array();
    $data['session'] = $session;
    $data['format'] = 'php'; # You can also specify 'xml' as the format.
    $data['text'] = '&lt;p&gt;Google today reminded everyone just how far it has come by not just releasing a video that shows off what the company has accomplished over the years since its inception, but also redesigning its logo so that it looks altogether more flat, presumably to follow suit with how interfaces and logos seem to look in 2015. The video, by the way, is well worth a watch if you find yourself forgetting just what Google has contributed to the world of search and information technology. You may be frightened of the information it holds, but there’s no doubting Google’s technical prowess.&lt;/p&gt; &lt;p&gt;If you’re using an Android smartphone and want to celebrate the evolution of Google, then you might want to check out this customized boot animation&amp;nbsp;that has cropped up on &lt;em&gt;Android&amp;nbsp;Forums&lt;/em&gt;. Installing it is a relatively simple affair, and we’re going to take you through it step by step. There are a number of&amp;nbsp;ways to go about installing it; we’ve picked the simplest one that applies to most&amp;nbsp;devices.&lt;/p&gt; &lt;p&gt;&lt;img width="600" height="320" alt="Google-Evolved-logo-bootanimation-Android" src="http://cdn.redmondpie.com/wp-content/uploads/2015/09/Google-Evolved-logo-bootanimation-Android.jpg" style="margin: 0px auto; display: block;" class="aligncenter size-full wp-image-194470" scale="0"&gt;&lt;/p&gt; &lt;p&gt;Here’s what you need to do get the ‘Google Evolved’ boot animation onto your device:&lt;/p&gt; &lt;p&gt;Step 1: Install a root file explorer to your phone if you don’t already have one. Free options like ES File Explorer can be downloaded from the Play Store.&lt;/p&gt; &lt;p&gt;Step 2: Launch the file explorer app and navigate to the&amp;nbsp;&lt;i&gt;/system/media&amp;nbsp;&lt;/i&gt;directory. Copy the&amp;nbsp;‘bootanimation.zip’ file inside and paste it to another folder. This is optional, but it’s always worth having a backup just in case the worst was to happen.&lt;/p&gt; &lt;p&gt;Step 3: Download the ‘Google Evolved’&amp;nbsp;bootanimation.zip to your phone from here.&lt;/p&gt; &lt;p&gt;Step 4: Copy the downloaded file from the Downloads folder,&amp;nbsp;paste it&amp;nbsp;to&amp;nbsp;&lt;i&gt;/system/media&lt;/i&gt;, allowing the file explorer to overwrite the existing file. Remember, this directory isn’t the same for all devices. You might have to look up where your&amp;nbsp;device’s bootanimation directory is.&lt;/p&gt; &lt;p&gt;Step 5: Once the file is copied over, make sure that&amp;nbsp;its permissions are set to 0644. Note that copying to root directories requires root access. If your device isn’t rooted, and you have the Android SDK set up on your computer, you can use ADB to push the bootanimation.zip file from your computer&amp;nbsp;to the &lt;em&gt;/data/local&amp;nbsp;&lt;/em&gt;directory.&lt;/p&gt; &lt;p&gt;Step 6: Reboot your device and you’re set!&lt;/p&gt; &lt;p&gt;&lt;img width="599" height="322" alt="Ikbdtml" src="http://cdn.redmondpie.com/wp-content/uploads/2015/09/Ikbdtml.gif" style="margin: 0px auto; display: block;" class="aligncenter  wp-image-194471" scale="0"&gt;&lt;/p&gt; &lt;p&gt;The other two ways to get the boot animation involve flashing a ZIP file using a custom recovery like ClockworkMod or TWRP and installing an APK file via&amp;nbsp;the&amp;nbsp;CyanogenMod Theme Engine. The latter is the easiest method of the lot, but you will need to have CyanogenMod installed, or any other AOSP&amp;nbsp;custom ROM that includes&amp;nbsp;the aforementioned theme engine.&lt;/p&gt; &lt;p&gt;&lt;em&gt;(via: Reddit)&lt;/em&gt;&lt;/p&gt; &lt;p&gt;You may also like to check out:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Download Android 6.0 Marshmallow Launcher, Wallpapers, Boot Animation For Any Device&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;You can follow us on&amp;nbsp;Twitter, add us to your circle on&amp;nbsp;Google+&amp;nbsp;or like our&amp;nbsp;Facebook page&amp;nbsp;to keep yourself updated on all the latest from Microsoft, Google, Apple and the web.&lt;/p&gt; &lt;/div&gt;';
    $data['action'] = $testmethod;
    $data['maxsyns'] = '3'; # The number of synonyms per term.
  
    if($testmethod=='replaceEveryonesFavorites'){
      # Add a quality score for this method.
      $data['quality'] = '1';
    }
  
    # Post to API and get back results.
    $output = curl_post($url, $data, $info);
    $output = unserialize($output);
  
    # Show results.
    echo "&lt;p&gt;&lt;b&gt;Method:&lt;/b&gt;&lt;br&gt;$testmethod&lt;/p&gt;";
    echo "&lt;p&gt;&lt;b&gt;Text:&lt;/b&gt;&lt;br&gt;$data[text]&lt;/p&gt;";
  
    $data['action'] = 'apiQuota';
    $quota = curl_post($url, $data, $info);
    $quota = unserialize($quota);
  
    if($output['success']=='true'){
      echo "&lt;p&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br&gt;" . str_replace("\r", "&lt;br&gt;", $output['output']) . "&lt;/p&gt;&lt;p&gt;Remaining quota: $quota[output]&lt;/p&gt;";
    }
    else{
      echo "&lt;p&gt;&lt;b&gt;Error:&lt;/b&gt;&lt;br&gt;$output[error]&lt;/p&gt;";
    }
  }
  else{
    # There were errors.
    echo "&lt;p&gt;&lt;b&gt;Error:&lt;/b&gt;&lt;br&gt;$output[error]&lt;/p&gt;";
  }
  ?&gt;
  </code></pre>
  
  <p>Here is url where my code there </p>
  
  <pre><code>http://technews4u.net/apiexample.php
  </code></pre>