Heim > Fragen und Antworten > Hauptteil
Was ist, wenn der URL-Link https://mbd.baidu.com/newspage/data/landingsuper?context=%7B%22nid%22%3A%22news_4480296238548479181%22%7D&n_type=0&p_from=1 lautet?
Webinformationen durchsuchen
NULL2017-12-07 13:23:13
可以用file_get_contents 或者是curl 代码:
function getHTTPS($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $result = curl_exec($ch); curl_close($ch); return $result; }