Sticker的博客

The Secret of Success: Suck Less

程序员之旅之Codeigniter驿站

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
function curl_file_get_contents($durl){
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, $durl);
   curl_setopt($ch, CURLOPT_TIMEOUT, 30);
   curl_setopt($ch, CURLOPT_USERAGENT, _USERAGENT_);
   curl_setopt($ch, CURLOPT_REFERER,_REFERER_);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  
   curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
   $r = curl_exec($ch);
   curl_close($ch);
   return $r;
 }

 

posted on 2013-04-20 12:58  Sonimy  阅读(1227)  评论(0编辑  收藏  举报
高调做事,低调做人!