I am trying to transfer my first steps to Telegram, and I am also new to PHP ......
I configured Apache 2.4 with PHP 5.6.14 and SSL on my Windows 7 PC and it works fine in http and https.
Then I tried to complete this telegram tutorial https://www.youtube.com/watch?v=hJBYojK7DO4 . Everything works fine until I create a simple PHP program like this
<?php
$botToken = "<my_bot_token>";
$website = "https://api.telegram.org/bot".$botToken;
$update = file_get_contents($website."/getUpates");
print_r($update);
?>
When I try to put in my browser
https:
answer
Warning: file_get_contents(https://api.telegram.org/<my_bot_token>/getupates): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in <my_php_file_location> on line 6
I searched the Internet for similar problems, but I didn’t solve anything: the most interesting answer in this question is file_get_contents - could not open the stream: the HTTP request failed! HTTP / 1.1 404 not found , but I don’t understand how to adapt it to my business.
, file_get_contents.
, PHP, - -... bu ,
?
ADDED
, @aeryaguzov ....
, ...
<?php
$botToken = "<my_bot_token>";
$website = "https://api.telegram.org/bot".$botToken;
$update = file_get_contents($website."/getUpdates");
print_r($update);
?>