Authentication in php with oAuth

Thanks just a quick 2nd question.

The token appears in the url after you get redirected can I use that token in the URL?

I have it in php with the function $_SERVER['QUERY_STRING']

but the offical API documentation says I need to use

POST https://api.twitch.tv/kraken/oauth2/token

But I don’t know how to use this “post”