Answer the question
In order to leave comments, you need to log in
How to show text only for Yandex?
Hello. There is such a code
if (stripos($_SERVER['HTTP_REFERER'], '.yandex.') !== false) {
echo "Show what I want";
}
Answer the question
In order to leave comments, you need to log in
Most likely, the referrer is different, something like clickyandex.ru or yandexclick.ru
You can experiment and not be tied strictly to ".yandex.", remove the dot at the beginning or end of the line. But this is... There may be false positives from other Yandex-like site names.
It is better to check on your site by tracking the referrer by going to your site from Yandex
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question