Send mp3 file with php to telegram
<p>I use this Api for manage robot .</p>

<p><a href="https://github.com/mgp25/Telegram-Bot-API" rel="nofollow">https://github.com/mgp25/Telegram-Bot-API</a></p>

<p>I want send MP3 from URL to telegram user so i change class like this and add this line after line 399</p>

<pre><code>'audio/mpeg'   =&gt;  '.mp3',
</code></pre>

<p>mp3 send with success but my problem is function return json and not convert json to array;I echo returned data and I've got it at the end of json string add one 1 like this</p>

<pre><code>{"ok":true,"result":{"message_id":46328,"from":{"id":115910361,"first_name":"Persian Robot","username":"TPersian_bot"},"chat":{"id":133180682,"first_name":"Mohammad Reza","last_name":"Behzadfar","username":"Lifesoul","type":"private"},"date":1457607231,"audio":{"duration":176,"mime_type":"audio\/mpeg","title":"Mozoo Chiye","performer":"Yasin","file_id":"BQADBAADKwAD2aboBniCRUQ1WE48Ag","file_size":7137408}}}1
</code></pre>

<p>and this my code:</p>

<pre><code>    $Telegram = new Telegram(API);
$result = $Telegram-&gt;sendAudio(133180682, "https://rjmediamusic.com/media/mp3/Yasin-Mozoo-Chiye.mp3");
var_dump(json_decode(rtrim($result,'1'),TRUE));
</code></pre>