U
U
user0name02018-08-20 18:08:55
PHP
user0name0, 2018-08-20 18:08:55

Why doesn't sendPhoto work in Telegram API?

I'm trying to auto-post to a Telegram channel.

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.telegram.org/bot'.$BotAPI.'/sendPhoto?chat_id='.$chat_id.'&photo='.$image);
$result = curl_exec($curl);
echo $result;
Returns bool(false). But if you open the url yourself, then everything works. What is the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Davydov, 2018-08-20
@user0name0

The reason for the RKN, most likely. Connect the proxy to cURL, then it should work!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question