One approach would be to use the parse_str()
and parse_url()
functions. You can use this to separate the string information to find a certain parameter value.
parse_str(parse_url($urlString, PHP_URL_QUERY), $array)
All of the parameters would be stored in the $array variable.
Credit: https://stackoverflow.com/a/3136450/2748747
solved remove part of url from google API [closed]