Advertisement
Guest User

Untitled

a guest
May 7th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. $headers = array(
  4.     'Accept-Encoding: gzip, deflate');
  5.  
  6. $ch = curl_init('http://en.wikipedia.org/');
  7. curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
  8. curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
  9. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  10. $res = curl_exec($ch);
  11. echo $res;
  12. curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement