Web source code with CURL
1
How to take web source code with CURL
<?php
// $page_url = Page URL
function page_source($page_url)
{
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,$page_url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
echo page_source('http://yahoo.com');
?>






There are currently no comments for this snippet.