Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function _HttpRequest($link,$cookie='')
- {
- $headers = array();
- $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0';
- $headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
- $headers[] = 'Accept-Language: en-US,en;q=0.5';
- $headers[] = 'Connection: keep-alive';
- if ($cookie != '')
- $headers[] = 'Cookie: '.$cookie;
- $headers[] = 'Cache-Control: max-age=0';
- if($link != "")
- {
- $ch = curl_init();
- curl_setopt ($ch, CURLOPT_URL, $link);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $page = curl_exec($ch);
- curl_close($ch);
- }
- return $page;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement