I have this code to send text and images to telegram via web, but the problem that the images do not send me through the inputfile here below I leave the code ..
<?php
error_reporting(0);
$token = "AQUI API";
$chat_id = "CHAT ID";
$photo = "$_POST[photo]";
$text = "$_POST[text]";
$response = file_get_contents("https://api.telegram.org/bot".$token."/sendMessage?chat_id=".$chat_id."&text=$text");
$response = file_get_contents("https://api.telegram.org/bot".$token."/sendPhoto?chat_id=".$chat_id."&photo=".$photo."&caption=".$caption);
?>
<form method="POST" action="" enctype="multipart/form-data">
<label>
<span>chat_id :</span>
<input id="chat_id" type="text" name="chat_id" value="" />
</label>
<label>
<span>caption :</span>
<input id="text" type="text" name="text"/>
</label>
<label>
<span>photo</span>
<input id="photo" type="file" name="photo" />
</label>
<label>
<span> </span>
<input type="submit" class="button" value="sendPhoto" />
</label>
</form>
to see if someone could help me
Thanks in advance!