I
I
Ivan Ivanovich2020-05-15 15:36:55
PHP
Ivan Ivanovich, 2020-05-15 15:36:55

Problem with &?

Hello.

I work with api vk, I ran into a problem.

When testing on local, everything works fine, but when I uploaded it to the server, I started getting an error.

There is a line for getting a token:

$token = json_decode(file_get_contents(urldecode('https://oauth.vk.com/access_token?client_id='.$appId.'&redirect_uri='.$url.'&client_secret='.$secretKey.'&code='.$_GET['code'])), true);


Everything is ok on the local, but on the server the following line is received in the response:

https://oauth.vk.com/access_token?client_id=...&redirect_uri=...&client_secret...


Those. Somehow appeared here &

Please tell me how to fix this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question