I use the code below to check if the URL contains a specific word (eg. foobar):
<?php $geturl = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?>
<?php if (strpos($geturl, 'foobar') == true) {
//Do something here
} ?>
This works pretty much perfect but if i try to search for a Greek word (eg. καλημέρα)
<?php if (strpos($geturl, 'καλημέρα') == true) {
//Do something here
} ?>
then it doesn't work. I tried to use also mb_strpos
and didn't work too. How can i make it work ?
UPDATE: If i try to echo the saved url with <?php echo $geturl; ?>
i am getting this:
/myserver/%CE%BA%CE%B1%CE%BB%CE%B7%CE%BC%CE%AD%CF%81%CE%B1
Instead it should be like that:
/myserver/καλημέρα