Comments (2)
Hello!
You cant send file via url. You can upload file content through POST or specify the ID of an already loaded file.
For example, you can download file via url and send to telegram api:
$filePath = tempnam(sys_get_temp_dir(), 'tg_');
file_put_contents($filePath, file_get_contents('www.photo.com/image.png'));
$bot->sendPhoto($chatId, new CURLFile($filePath,'image/png','myImage.png'));
unlink($filePath);
from api.
Yeah ! That's why I have done already. Was just wondering of is there is any option.
Thanks you for reply. :)
from api.
Related Issues (20)
- Allow to use `attach://<file_attach_name>` syntax inside sendMediaGroup HOT 3
- Как отправить сообщение с кирилицей? HOT 1
- Bot
- Can't Instantiate UserProfilePhotos HOT 1
- Не работает кнопка запроса номера телефона из телеграм бота. HOT 3
- Creating a Channel Invite Link with a Bot HOT 5
- Support chat_member and my_chat_member update
- No description provided.
- how to use ForceReply HOT 2
- how to send message with entities ?
- 悬赏求定制telegrambot
- Внезапно перестали работать БОТы HOT 2
- Как получить ID отправленного сообщения и ID чата HOT 8
- Need up setting up HOT 5
- delete_message
- Support BOT API 7.0 (december 29 2023)
- Support BOT API 7.1 (february 16 2024)
- Support BOT API 7.2 (march 31, 2024)
- Add a Compatibility Table HOT 1
- composer require telegram-bot/api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.