Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function curls($url)
- {
- $ch = curl_init();
- $options = [
- CURLOPT_URL => $url,
- CURLOPT_REFERER => "https://meowstream.com",
- CURLOPT_VERBOSE => true,
- CURLOPT_AUTOREFERER => false,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_SSL_VERIFYPEER => false,
- CURLOPT_SSL_VERIFYHOST => false,
- CURLOPT_USERAGENT => "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0",
- ];
- curl_setopt_array($ch, $options);
- $this->out = curl_exec($ch);
- $error = curl_error($ch);
- $errno = curl_errno($ch);
- curl_close($ch);
- if($error) {
- goto curl_error;
- }
- return $this->out;
- curl_error: {
- throw new Exception("Failed to run curl: {$errno} : {$error}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement