There is a cases that we need to check our URL if there is a word we need on it.
To search a URL in a specific word, Use this code.
$url = $_SERVER['REQUEST_URI'];
//do something here...
First the $_SERVER[‘REQUEST_URI’] will return the full path of the URL including the query string, in my case I put it on a variable called $url then I use strpos function to find the word “findme” in the full path of the url.