Created
September 21, 2016 09:20
-
-
Save Anan5a/d6e80e52be2ceab619802fa8b3653fbd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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