PDA

View Full Version : Show Ad code only if URL do not contains certain phrasses



Fli
11-12-2014, 03:08 PM
Hello,

i found an PHP code which will show an text if webpage URL contains some phrasse:


$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];


if (false !== strpos($url,'car')) {
echo 'Car exists.';
} else {
echo 'No cars.';
}

But how it should look like if i have more phrasses to check for?