Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function fetch_html ($url){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, ZDUSER."/token:".ZDAPIKEY);
curl_setopt($ch, CURLOPT_USERAGENT, "Lynx/2.8.8dev.3 libwww-FM/2.14 SSL-MM/1.4.1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
$webpage = curl_exec($ch);
curl_close($ch);
return $webpage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment