title: curl is not logging into cpanel
body: <p>I have this wonderful php class that used to let me login into cpanel and call any path I wanted. Now its broken:</p>
  
  <pre><code>&lt;?php
  class cPanel {
    var $cPanelUser   = "";
    var $cPanelPass   = "";
    var $cPanelDomain = "";
    var $cPanelPort   = 0;
    var $cPanelRel    = "";
    var $cPanelRoot   = "";
  
    function cPanel($cPanelDomain, $cPanelPort, $authUser, $authPass) {
      $this-&gt;cPanelDomain = $cPanelDomain;
      $this-&gt;cPanelPort = $cPanelPort;
      $this-&gt;cPanelUser = $authUser;
      $this-&gt;cPanelPass = $authPass;
      //Root path of cPanel to load pages begining with /
  
      $this-&gt;cPanelRoot = "http".($this-&gt;cPanelPort==2083 ? "s" : "")."://".$this-&gt;cPanelDomain.":".$this-&gt;cPanelPort."/frontend/x3/";
      //Relative path of cPanel to load pages not begining with /
      $this-&gt;cPanelRel = $this-&gt;cPanelRoot."";
    }
    function fetchPage($cPanelPage, $sPostVars = "") {
      $curl = curl_init();
      $loginf = sprintf("[%s]:[%s]", $this-&gt;cPanelUser, $this-&gt;cPanelPass);
  
      //Build the path. If it begins with / we go and paste at root
      if ($cPanelPage[0] == '/') {
        $url = $this-&gt;cPanelRoot.substr($cPanelPage, 1);
      }
      else {
        //Build the path - if begins with / we go and paste relative
        $url = $this-&gt;cPanelRel.$cPanelPage;
      }
  
      curl_setopt ($curl, CURLOPT_URL, $url."?".$sPostVars);
      curl_setopt ($curl, CURLOPT_TIMEOUT, 30);
      curl_setopt ($curl, CURLOPT_USERAGENT, sprintf("Mozilla/%d.0",rand(4,5)));
      curl_setopt ($curl, CURLOPT_FOLLOWLOCATION, 1);
      curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
      curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
      curl_setopt ($curl, CURLOPT_FAILONERROR, 0);
      curl_setopt ($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
      curl_setopt ($curl, CURLOPT_USERPWD, $loginf);
      $html = curl_exec ($curl);
      echo 'Errors: ' . curl_errno($curl) . ' ' . curl_error($curl) . '&lt;br&gt;&lt;br&gt;';
      echo $html;
      curl_close ($curl);
  
      //print_r($url);
      return $html;
    }
  
  }
  </code></pre>
  
  <p>I am using this script on one server and calling trying to login on another server and run a fastastico script. This is the error output: Errors: 7 couldn't connect to host</p>
  
  <p>I've check username and password multiple times.</p>