php url info code example
Example 1: php get url path name
parse_url( $_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH );
Example 2: if browser url is having query string after domain name in it check using php
$url = $_SERVER['REQUEST_URI'];
if (!strpos($url,'mysql')) {
echo 'No mysql.'; //swapped with other echo statement
} else {
echo 'Mysql exists.';
}