Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function curl($url, $timeout = 5){
- $ci = curl_init();
- curl_setopt($ci, CURLOPT_URL, $url);
- curl_setopt($ci, CURLOPT_HEADER, 0);
- curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ci, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ci, CURLOPT_TIMEOUT, $timeout);
- curl_setopt($ci, CURLOPT_HTTPHEADER, array("Cache-Control: no-cache", "Pragma: no-cache"));
- curl_setopt($ci, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
- $r = curl_exec($ci);
- curl_close($ci);
- return $r;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement