我想要的是简单的获取网页 HTML 并抓取所有出站链接
到目前为止我所拥有的是
<?php
function get_content($URL){
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $URL);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$html = get_content('http://example.com');
?>