mirror of
https://github.com/kvazar-network/crawler-api-node.git
synced 2025-01-08 22:27:55 +00:00
16 lines
285 B
PHP
16 lines
285 B
PHP
<?php
|
|
|
|
function decodeString($string) {
|
|
|
|
if (is_numeric($string) && $string < 0xFFFFFFFF) {
|
|
return mb_chr($string, 'ASCII');
|
|
} else {
|
|
return hex2bin($string);
|
|
}
|
|
}
|
|
|
|
function filterString($string) {
|
|
|
|
return strip_tags(html_entity_decode($string, ENT_QUOTES, 'UTF-8'));
|
|
}
|