title: How do I send a photo to telegram channel with telegram bot?
body: <p>I can send a photo to telegram chat with chat id using this code:</p>
  
  <pre><code>&lt;?php
       $bot_url    = "https://api.telegram.org/bot&lt;token-bot&gt;/";
       $ch = curl_init($bot_url.'SendPhoto');
       $cfile = new CURLFile(realpath('file.png'),'image/png','photo.png');
       $data = array(
           'chat_id' =&gt; '118186395',
           'photo' =&gt; $cfile ,
           'caption' =&gt; 'testing'
       );
       curl_setopt($ch, CURLOPT_POST,1);
       curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
       curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
       echo curl_exec($ch);
  ?&gt; 
  </code></pre>
  
  <p>But if I change the <code>chat_id</code> value to the id of my channel, I receive an empty answer from telegram and the photo is not sent.</p>