Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. $url = "https:somewebsite.com";
  2.  
  3. $ch = curl_init($url);
  4.  
  5.  
  6. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // Accepts all CAs
  7. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  8. curl_setopt($ch, CURLOPT_FAILONERROR, true);
  9. //curl_setopt($ch, CURLOPT_URL, $url);
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  11.  
  12. $output = curl_exec($ch);
  13.  
  14. if(curl_error($ch))
  15. {
  16. echo 'error:' . curl_error($ch);
  17. }
  18. curl_close($ch);
  19. echo $output;
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement