php根據URL得到網頁內容

php 中根據url來得到網頁內容很是的方便,能夠經過系統內置函數file_get_contents(),傳入url,便可返回網頁的內容,好比得到百度首頁的內容代碼爲:php <?php $html = file_get_contents('http://www.baidu.com/'); echo $html; 就能夠顯示出百度首頁的內容,可是,這個函數不是萬能的,由於有些服務器會禁用掉這個函
相關文章
相關標籤/搜索