SHARE
TWEET

Untitled

a guest May 19th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private function curls($url)
  2.     {
  3.         $ch = curl_init();
  4.  
  5.         $options = [
  6.             CURLOPT_URL => $url,
  7.             CURLOPT_REFERER => "https://meowstream.com",
  8.             CURLOPT_VERBOSE => true,
  9.             CURLOPT_AUTOREFERER => false,
  10.             CURLOPT_RETURNTRANSFER => true,
  11.             CURLOPT_SSL_VERIFYPEER => false,
  12.             CURLOPT_SSL_VERIFYHOST => false,
  13.             CURLOPT_USERAGENT => "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0",
  14.         ];
  15.        
  16.         curl_setopt_array($ch, $options);
  17.  
  18.         $this->out = curl_exec($ch);
  19.  
  20.         $error = curl_error($ch);
  21.         $errno = curl_errno($ch);
  22.        
  23.         curl_close($ch);
  24.  
  25.         if($error) {
  26.             goto curl_error;
  27.         }
  28.  
  29.         return $this->out;
  30.  
  31.         curl_error: {
  32.             throw new Exception("Failed to run curl: {$errno} : {$error}");
  33.         }
  34.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top