2017-09-19 3 views
0

je reçois une erreur dans ma source php ... (je ne suis pas maître de php)failed to open stream dans ma source 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); 

et mon erreur:

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 

comment puis-je fixer :(

Répondre

0

Vous définissez le $API_KEY, $chatid, $from_id2 après l'avoir utilisé.

Essayez ceci avec la bonne 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

fonctionne pas à nouveau :( – Saeed

+0

même avertissement possible de partager une capture d'écran – Fawzan

+0

i correctement définir, mais écrire ici mal:? X – Saeed