php get current url address site:stackoverflow.com code example
Example: if browser url is having domain name in it check using php
$url = $_SERVER['SERVER_NAME'];
if (!strpos($url,'mysql')) {
echo 'No mysql.'; //swapped with other echo statement
} else {
echo 'Mysql exists.';
}