SHARE
TWEET

Untitled

a guest Jan 24th, 2020 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getCurl($url)
  2. {
  3.     $curl = curl_init();
  4.  
  5.     curl_setopt_array($curl, array(
  6.         CURLOPT_SSL_VERIFYHOST => 2,
  7.         CURLOPT_SSL_VERIFYHOST => 2,
  8.         CURLOPT_URL => $url,
  9.         CURLOPT_RETURNTRANSFER => true,
  10.         CURLOPT_ENCODING => "",
  11.         CURLOPT_TIMEOUT => 30000,
  12.         CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  13.         CURLOPT_CUSTOMREQUEST => "POST",
  14.         CURLOPT_POSTFIELDS => http_build_query(['loggedIn' => 1, 'version' => 2, 'source' => 'web']),
  15.         CURLOPT_HTTPHEADER => array(
  16.             // Set Here Your Requesred Headers
  17.             'public-key: VXGNq3GcR73gNJ2FLN2cMZwHPPujy71yrveK0scORS7KzoXWVyjXjh6vzZ1spvzg',
  18.             'token: eyJpdiI6InN6OFF0RWYrOVwvcXNVcHNlb2xpNlBnPT0iLCJ2YWx1ZSI6IjRWelEwUk1nV1lyZFVsemJNamMydVE9PSIsIm1hYyI6IjM3M2QxNWM4NWM3NWM5OTcyYjc0ZTc0YmUyY2M4OTk2MzI1MWJiZDRkZTE0NzgzMTE2NzdhMzgzOWQzOWJkYTYifQ==',
  19.         ),
  20.     ));
  21.     $response = curl_exec($curl);
  22.     $err = curl_error($curl);
  23.     curl_close($curl);
  24.  
  25.     if ($err) {
  26.         $result = "cURL Error #:" . $err;
  27.     } else {
  28.         $result = json_decode($response);
  29.     }
  30.     return  $result;
  31. }
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