title: always failed to send image using telegram API using PHP
body: <p>I want to make a function to send an image using Telegram API (reference API: <a href="https://github.com/mgp25/Telegram-Bot-API/" rel="nofollow">https://github.com/mgp25/Telegram-Bot-API/</a>), but when I try to run this, I always get an error like this:</p>
  
  <blockquote>
    <p>Message: file_get_contents(''): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request </p>
  </blockquote>
  
  <p>Here is my code [updated]:</p>
  
  <pre><code>&lt;?php
  
  require 'Telegram.php';
  
  $tele = new telegramBot('token');
  //$info = $tele-&gt;sendMessage('218945828',"wadaw");
  $url= 'image/maldini.jpg';
  $info = $tele-&gt;sendPhoto('chatid',$url);
  print_r($info);
  
  ?&gt;
  </code></pre>
  
  <p>error :</p>
  
  <p>Warning: file_get_contents(<a href="https://api.telegram.org/bot_token/sendPhoto?chat_id=chat_id&amp;photo=0" rel="nofollow">https://api.telegram.org/bot_token/sendPhoto?chat_id=chat_id&amp;photo=0</a>): failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\mgp25\Telegram-Bot-API-master\src\Telegram.php on line 465</p>
  
  <p>What's wrong with my code?</p>