Answer the question
In order to leave comments, you need to log in
How to make Cyrillic readable in HTTP_REFERER?
I have a PHP handler for sending requests to mail, it contains the element [email protected]$_SERVER['HTTP_REFERER']. , to indicate the link that the client came from.
Part of this link is in Cyrillic (dynamic utm tags). At the same time, a link of the following form is sent to the mail: test.ru/?utm_source=%D0%A2%D0%95%D0%A1%D0%A2
Is it possible to make the link displayed in Cyrillic in the received letter, or "on the fly" converted to transliteration?
Answer the question
In order to leave comments, you need to log in
$str = 'test.ru/?utm_source=%D0%A2%D0%95%D0%A1%D0%A2';
print urldecode($str);
test.ru/?utm_source=ТЕСТ
instead of putting a text link in the body of the email, put its html incarnation
<a href='http://ссылка'>текст, который будет виден в письме, подчеркнутым как ссылка</a>
in the text, you can write anything and in any way, as long as the headings of the letter and in the head correspond to the encoding
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question