Is anyone aware of a way to remove redundant variables from a query string.
For example, reducing the below URL from this:
youtube.com/watch?v=123&feature=g-all&something=lalala
To the following:
youtube.com/watch?v=123
Alternatively, how could you compare two URLs with a different query string to check if they are the same page?
php has built in functions for this; parse_url() and parse_str()
So, you can use both functions to extract the parameters you want without having to explode and guess the position of the parameters.
This should be better than exploding or even using regex.