How do I get this information from php? #6115
-
Hello, I've been trying for days to find how to obtain this information with php but I can't do it, could someone help me? This is my code that I'm using: array( 'header' => "Authorization: Bot {$token}\r\n", 'methods' => 'GET', ), ); $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response === false) { die('Error fetching data from Discord API'); } header('Content-Type: application/json'); echo $response; ?> |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You get that information by parsing the information you get from discord, currently you are only handling the raw response |
Beta Was this translation helpful? Give feedback.
-
PS: Such questions do not belong to the GitHub issues of the API documentation. If it is a question related to the usage of the raw API, I recommend joining the Discord Developers server and ask in the If it is a question on how to format things and general PHP programming, join relevant Discord servers, e.g. The Programmer's Hangout - |
Beta Was this translation helpful? Give feedback.
PS: Such questions do not belong to the GitHub issues of the API documentation.
If it is a question related to the usage of the raw API, I recommend joining the Discord Developers server and ask in the
#api-questions
.If it is a question on how to format things and general PHP programming, join relevant Discord servers, e.g. The Programmer's Hangout -
#php
or any PHP related servers that you can find with the Server Discovery page.