K
K
Kirill Gorelov2016-07-21 21:29:00
PHP
Kirill Gorelov, 2016-07-21 21:29:00

Api vkontakte gives different data, what's the problem?

Hello.
I make a request for information about a post on the wall, where I want to get a picture and a list of audio recordings.

$get_params = http_build_query($request_params);
$result = json_decode(file_get_contents('https://api.vk.com/method/wall.getById?'. $get_params));

The wall.getById method.
As a result, I get different links to audio. Although when testing in VK itself, they turn out to be correct, they give me the wrong ones (I check the links, but they do not exist). Although the picture for the record and the text itself are correct. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
riot26, 2016-07-21
@riot26

The link to the .mp3 file is tied to an IP (in your case, to the IP of the server). You can execute requests using JS on the client or upload files to the server and serve them from there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question