Guest User

Untitled

a guest
Jun 25th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. function get_url_contents($url){
  2. $crl = curl_init();
  3. $timeout = 5;
  4. curl_setopt ($crl, CURLOPT_URL,$url);
  5. curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
  6. curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
  7. $ret = curl_exec($crl);
  8. curl_close($crl);
  9. ret
Add Comment
Please, Sign In to add comment