2

I have a file in telegram and I want put it in my website with telegram bot api . but I don't want to share my bot token. for example my real path is :

https://api.telegram.org/file/botxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/photos/file_1.jpg

Note : xxxx is my bot token.

How can I set a url in my website that a user click on it download a file with don't see this url like :

http://my_domain.com/?file=file_1.jpg

And I redirect user to this url without see this url :

https://api.telegram.org/file/botxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/photos/file_1.jpg
Suneel Kumar
  • 1,650
  • 2
  • 21
  • 31
  • 2
    Asking us to write code for you is not what we do here at StackOverflow. Check out this link for information on how to download files with PHP: https://stackoverflow.com/questions/3938534/download-file-to-server-from-url – Linus Juhlin Jul 24 '17 at 06:41
  • i dont want to write code! i want to tell me a way to do this just! –  Jul 24 '17 at 06:42
  • tnx a lot about redirecting me to this question :) –  Jul 24 '17 at 06:45
  • May I ask what this has to do with `jquery` or `javascript`? – node_modules Jul 24 '17 at 06:46
  • yes.you can get real path an change it :| think first in then speak –  Jul 24 '17 at 06:52

1 Answers1

0

You should Download Files from your Bot's secret file url to your host and then users download it from your site url. the Important thing is Your Secret URL is Secret

PurTahan
  • 789
  • 8
  • 24