Skip to content

Instantly share code, notes, and snippets.

@Anan5a
Created September 21, 2016 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anan5a/d6e80e52be2ceab619802fa8b3653fbd to your computer and use it in GitHub Desktop.
Save Anan5a/d6e80e52be2ceab619802fa8b3653fbd to your computer and use it in GitHub Desktop.
<?php
function get_html($url)
{
$ch=curl_init($url);
$c_o_a=array(
CURLOPT_USERAGENT=> 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)',
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_FOLLOWLOCATION=>1,
CURLOPT_AUTOREFERER=>false,
CURLOPT_REFERER=>"http://tring.ga",
CURLOPT_CONNECTTIMEOUT=>20,
CURLOPT_TIMEOUT=>60
);
curl_setopt_array($ch,$c_o_a);
$html=curl_exec($ch);
curl_close($ch);
return $html;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment