-1
我想做出發送帶有按鈕這樣的file_get_contents和電報API(reply_markup)
命令,所以我做這個
$url = "https://api.telegram.org/" . $token . "/sendMessage?chat_id=" . $message_chat_id . "&text=" . urlencode($message_text) . '&reply_markup={"inline_keyboard":[[{"text":"Visualizza spoiler!","url":"http://google.com/"}]]}';
,它使這個網址
https://api.telegram.org/censored/sendMessage?chat_id=censored&text=%2Fspoiler+ciao&reply_markup={"inline_keyboard":[[{"text":"Visualizza spoiler!","url":"http://google.com/"}]]}
當我在瀏覽器中使用這個網址它的作品,但是當我使用file_get_contents它不是
有人可以幫助我嗎?
你試過CURL嗎?那是什麼版本的PHP?你有沒有檢查服務器上是否啓用了file_get_contents? – wast
nop,因爲直到現在我用了file_get_contents; php5.6;是的,這是啓用,因爲如果我想發送一個簡單的消息,它的作品 – Dekus
你可以嘗試簡單的捲曲? https://stackoverflow.com/questions/7794604/file-get-contents-not-working – wast