SHARE
TWEET

Https()

a guest Feb 16th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Https($method,$datas){
  2. $url = "https://api.telegram.org/bot".API_KEY."/".$method;
  3. $ch = curl_init();
  4. curl_setopt($ch,CURLOPT_URL,$url);
  5. curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  6. curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
  7. $res = curl_exec($ch);
  8.  
  9.  
  10.  
  11. if(curl_error($ch)){ var_dump(curl_error($ch)); }
  12. else{ return json_decode($res); }
  13. }
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