There is a function
function getFile($file_id) { $file_path_array = json_decode(file_get_contents($GLOBALS['api'] . '/getFile?file_id=' . $file_id), TRUE); $file_path = $file_path_array['result']['file_path']; $file_path_url = 'https://api.telegram.org/file/bot00037100:XXXkXU9L8DXXXXXUSY0R36XXCQ9d3XXXX/'.$file_path; return $file_path_url; } It processes the format array.
{"ok":true,"result":{"file_id":"XXXXqcxGwyaYxXXXXXVvITMmrQ4ABOlO5XXX1KQBAXXX","file_size":47984,"file_path":"photos/file_0.jpg"}} For some reason, it can digest the values of file_id and file_size, but the file_path that’s necessary to categorically refuses
$file_path_url, you just output it wherefile_get_contents? - Let's say Pie