SEOstats/Services/3rdparty/GTB_PageRank.php
/**
   * HTTP GET request with curl.
   * @access    private
   * @param     string      $url        String, containing the URL to curl.
   * @return    string      Returns string, containing the curl result.
   */
HTTP GET request with curl.
@access    private
@param     string      $url        String, containing the URL to curl.
@return    string      Returns string, containing the curl result.
HTTP GET request with curl . @access private @param string $url String containing the URL to curl . @return string Returns string containing the curl result .
private static function GetWithCurl($url) {
      $ua = \SEOstats\Helper\HttpRequest::getUserAgent();
      $curlopt_proxy = \SEOstats\Helper\HttpRequest::getProxy();
      $curlopt_proxyuserpwd = \SEOstats\Helper\HttpRequest::getProxyUserPwd();
	  $ch  = curl_init($url);
      curl_setopt($ch,CURLOPT_USERAGENT,$ua);
      if($curlopt_proxy) {
          curl_setopt($ch, CURLOPT_PROXY, $curlopt_proxy);
      }
      if($curlopt_proxyuserpwd) {
          curl_setopt($ch, CURLOPT_PROXYUSERPWD, $curlopt_proxyuserpwd);
      }
      curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
      curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
      curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
      curl_setopt($ch,CURLOPT_MAXREDIRS,2);
      curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
      $str = curl_exec($ch);
      curl_close($ch);
      return $str;
  }
private static function GetWithCurl ( $ url ) { $ ua = \ SEOstats \ Helper \ HttpRequest :: getUserAgent ( ) ; $ curlopt_proxy = \ SEOstats \ Helper \ HttpRequest :: getProxy ( ) ; $ curlopt_proxyuserpwd = \ SEOstats \ Helper \ HttpRequest :: getProxyUserPwd ( ) ; $ ch = curl_init ( $ url ) ; curl_setopt ( $ ch , CURLOPT_USERAGENT , $ ua ) ; if ( $ curlopt_proxy ) { curl_setopt ( $ ch , CURLOPT_PROXY , $ curlopt_proxy ) ; } if ( $ curlopt_proxyuserpwd ) { curl_setopt ( $ ch , CURLOPT_PROXYUSERPWD , $ curlopt_proxyuserpwd ) ; } curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_CONNECTTIMEOUT , 5 ) ; curl_setopt ( $ ch , CURLOPT_FOLLOWLOCATION , 1 ) ; curl_setopt ( $ ch , CURLOPT_MAXREDIRS , 2 ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , false ) ; $ str = curl_exec ( $ ch ) ; curl_close ( $ ch ) ; return $ str ; }
HTTP GET request with curl.
HTTP GET request with curl .