Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getHtml($url){
- $curl_handle=curl_init();
- curl_setopt($curl_handle, CURLOPT_URL,$url);
- curl_setopt($curl_handle, CURLOPT_HEADER, false);
- curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, false);
- curl_setopt($curl_handle, CURLOPT_ENCODING, '');
- curl_setopt($curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
- curl_setopt($curl_handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1");
- $html = curl_exec($curl_handle);
- curl_close($curl_handle);
- return $html;
- }
Add Comment
Please, Sign In to add comment