I am trying to log in through Vkontakte, and I get an error number 17.

https://vk.com/dev/need_validation

Okay, never mind. But here the trouble comes, so when I click on the link of the form:

https://m.vk.com/login?act=security_check&api_hash=4a959bd2a221c 

And if all is successful, I redirect to

 https://oauth.vk.com/blank.html#success=1&access_token=новый_токен&user_id=ид_юзера 

I work through curl, how can I read this new URL after a redirect?

    1 answer 1

      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 

    Read more here - https://stackoverflow.com/questions/3519939/make-curl-follow-redirects