<?php $key = "密钥"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://data.06api.com/api.php?key=".$key."&type=".$type." &sn=".$sn); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 28800); curl_setopt($ch, CURLOPT_TIMEOUT, 300); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); $resp = curl_exec($ch); curl_close($ch); $resp = json_decode($resp, true); print_r($resp);