Advertisement
a1ananth

Untitled

Dec 26th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. function get_data($url)
  2. {
  3.     $ch = curl_init();
  4.     $timeout = 5;
  5.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  6.     curl_setopt($ch, CURLOPT_URL,$url);
  7.     curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  8.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,$timeout);
  9.     curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true);              
  10. //  curl_setopt($ch, CURLOPT_PROXY, "144.16.192.247");
  11. //  curl_setopt($ch, CURLOPT_PROXYPORT, "8080");
  12.  
  13.     $data = curl_exec($ch);
  14.     curl_close($ch);
  15.     return $data;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement