abstract:<?php$method = "GET";// 請求示例 url 默認請求參數(shù)已經(jīng)做URL編碼$url = "http://api01.bitspaceman.com:8000/share/weibo?apikey={您自己的apikey}&";$curl = curl_init(); curl_setopt($curl, CURLOPT_CU
<?php$method = "GET";// 請求示例 url 默認請求參數(shù)已經(jīng)做URL編碼$url = "http://api01.bitspaceman.com:8000/share/weibo?apikey={您自己的apikey}&";$curl = curl_init(); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_FAILONERROR, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_ENCODING, "gzip"); var_dump(curl_exec($curl)); ?>
Correcting teacher:天蓬老師Correction time:2019-03-30 10:33:54
Teacher's summary:你這個代碼, 你自己過上一周, 是否還能看明白呢? 所有代碼寫在一行, 是考驗哪個呢?
作業(yè)既然寫了, 就好好寫, 不要應付