📜  如何在 php 代码示例中的电报中创建机器人

📅  最后修改于: 2022-03-11 14:54:30.100000             🧑  作者: Mango

代码示例1
define('BASIC_API_URL', 'https://api.telegram.org/bot/');public function make(string $action): array {    $curlInit = curl_init();    curl_setopt($curlInit, CURLOPT_URL, BASIC_API_URL . $action);    $curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);    $output = curl_exec($ch);    curl_close($curlInit);    return json_decode($output, true);}