2017-09-19 34 views
0

我得到在我的PHP源的错误...(我不是PHP的主机)失败在我的PHP源开流

$API_KEY = '246010911:AAFVhj7jc4kXUPfBH1**************'; 
$chatid = $update->callback_query->message->chat->id; 
$from_id2 = $update->callback_query->from->id; 
$get1 = file_get_contents("https://api.telegram.org/bot$API_KEY/getChatMember?chat_id=$chatid&user_id=".$from_id2); 

和我的错误:

PHP Warning: file_get_contents(https://api.telegram.org/bot****/getChatMember?chat_id=&user_id=): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request 

我怎么能解决它:(

回答

0

你的$API_KEY$chatid$from_id2使用后确定。

用正确的API_KEY试试这个。

$API_KEY = '246010911:AAFVhj7jc4kXUPfBH1**************'; 
$chatid = $update->callback_query->message->chat->id; 
$from_id2 = $update->callback_query->from->id; 

$get1 = file_get_contents("https://api.telegram.org/bot$API_KEY/getChatMember?chat_id=$chatid&user_id=".$from_id2); 
+0

不会再工作:( – Saeed

+0

同样的警告可以共享的截图 – Fawzan

+0

我正确定义,但这里错写为:?X – Saeed