<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ``` <?php header('Content-Type:application/json; charset=utf-8'); class CompanySearch { public $searchKey=""; public $Key =""; private $SecretKey=""; public function __construct(){ $this->key="xxxxxx"; $this->SecretKey="xxxxxxxx"; } public function goSearch($searchKey, $provinceCode=null, $cityCode=null, $pageSize=null, $pageIndex=null){ $optional=""; if (!empty($provinceCode)) { $optional .= "&provinceCode=".$provinceCode; } if (!empty($cityCode)) { $optional .= "&cityCode=".$cityCode; } if (!empty($pageSize)) { $optional .= "&pageSize=".$pageSize; } if (!empty($pageIndex)) { $optional .= "&pageIndex=".$pageIndex; } $this->searchKey=$searchKey; $url="https://api.qichacha.com/FuzzySearch/GetList?key=".$this->key."&searchKey=".$this->searchKey.$optional; return $this->curl($url); } /** * url方式請求 * * @param string $url 要請求的url地址 * @param array $data 要發送的數據 存在該參數就啟用post提交,否則為get請求 * @return mixed $output 返回請求的結果 */ private function curl($url, $data = null){ // 1.創建一個新的CURL資源 $ch = curl_init(); // 2.設置URL相應的選項 curl_setopt($ch, CURLOPT_URL, $url); // 設置請求的URL地址 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // 將curl_exec()獲取的信息以文件流的形式返回,而不是直接輸出(0為直接輸出) //curl_setopt($ch, CURLOPT_HEADER, 0); // 啟用時會將頭文件的信息作為數據流輸出 curl_setopt($ch, CURLOPT_TIMEOUT, 10); // 設置cURL允許執行的最長秒數 curl_setopt($ch, CURLOPT_POST, $data ? 1 : 0); // 存在data就啟用post發送 啟用時會發送一個常規的POST請求,類型為:application/x-www-form-urlencoded,就像表單提交的一樣。 if (!empty($data)) { curl_setopt($ch, CURLOPT_POSTFIELDS, $data); } $time=time(); $headerArray=array( "Content-type:application/json;charset='utf-8'", "Accept:application/json", "Token:".strtoupper(md5($this->key.$time.$this->SecretKey)), "Timespan:".$time, ); curl_setopt($ch,CURLOPT_HTTPHEADER,$headerArray); //忽略證書 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSLVERSION, 1); //CURL_SSLVERSION_TLSv1 // 3.抓去URL并將它傳遞給瀏覽器 $output = curl_exec($ch); if ($output==false) { return curl_error($ch); curl_close($ch); } /*$aStatus = curl_getinfo($ch); if(intval($aStatus["http_code"])==200){ return $sContent; }else{ return false; }*/ // 4.關閉CURL資源,并且釋放系統資源 curl_close($ch); // 返回輸出 return $output; return json_encode($output); } } $get=$_GET; $searchKey=$get['searchKey']; $provinceCode=$get['provinceCode']??null; $cityCode=$get['cityCode']??null; $pageSize=$get['pageSize']??null; $pageIndex=$get['pageIndex']??null; $cs=new \CompanySearch(); $result=$cs->goSearch($searchKey, $provinceCode, $cityCode, $pageSize, $pageIndex); echo $result; ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看