Пример #1
0
 public function getData($c, $a, $par)
 {
     $url = ApiStore::get_api_url($c, $a);
     $key = ApiStore::get_api_key($c, $a);
     $url = ApiStore::generate_api_url($url, $par);
     if (function_exists("curl_exec")) {
         $ret = $this->baidu_api_curl_get($url, $key);
     } else {
         $ret = $this->baidu_api_file_get($url, $key);
     }
     return $ret;
 }
Пример #2
0
 public function getData($c, $a, $par)
 {
     $url = ApiStore::get_api_url($c, $a);
     $key = ApiStore::get_api_key($c, $a);
     $url = ApiStore::generate_api_url($url, $par);
     $url = array_merge($url, array('key' => $key));
     if (function_exists("curl_exec")) {
         $ret = $this->juhe_api_curl_get($url, $key);
     } else {
         $ret = $this->juhe_api_file_get($url, $key);
     }
     return $ret;
 }
Пример #3
0
 function getData($c, $a, $par)
 {
     $url = ApiStore::get_api_url($c, $a);
     $key = ApiStore::get_api_key($c, $a);
     $real_par = array();
     $temp = array('showapi_timestamp' => date('YmdHis'));
     $real_par = array_merge($par, $temp);
     $sign = $this->create_sign($real_par, $key);
     $url = ApiStore::generate_api_url($url, $real_par);
     $url .= 'showapi_sign=' . $sign . '&';
     if (function_exists("curl_exec")) {
         $ret = $this->showapi_api_curl_get($url, $key);
     } else {
         $ret = $this->showapi_api_file_get($url, $key);
     }
     return $ret;
 }