I am using google api and in url i am getting like this:
I tried:
$_SERVER['QUERY_STRING']
$url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
But what i got is http://website.com/generate-token/
How can i get either the complete url and use regex to get the access_token or any other way in which i can get it?