Good time of day. I would like to implement such a thing, which analyzes the last 10 messages and if the message is not checked
- we read that it was sent and if the message, for example, found in the "Base", or at the moment the Array, we chose one of the actions that corresponds to this message.
Lower the difficulty, I need to get the array via CURL, the workpiece is impossible, I get a json object, and immediately his decoder.
$token = 'TOKEN';
$url = "https://api.vk.com/method/messages.get?out=0&offset=0&filtres=0&last_message_id=0&count=10&v=5.34&access_token=".$token."";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curl, THIS, 0);
curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
$page = curl_exec($curl);
$exited = json_decode($page, true);
As a result, I get this business:
How can I get the parameters:
- The text of the message
- ID of the user who sent the message
- ID dialogue
- ID messages
Help, please. I just need to record the data in the variable and not more. Only learn PHP, but right now is hard.
P. S Without The File_Get_Contents