First commt

This commit is contained in:
2022-12-04 20:10:04 +01:00
committed by GitHub
commit 8c2df2b2ca
9 changed files with 582 additions and 0 deletions

18
API.php Normal file
View File

@ -0,0 +1,18 @@
<?php
function rand_item($arr){
return $arr[array_rand($arr)];
}
function API($method, $data)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.telegram.org/TOKEN/". $method);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$a= json_decode(curl_exec($ch) , true);
return $a;
}