YGGwave~
the radio catalog
%s', self::_getSignalPosition($hash), self::_getSignalPosition($hash, true), sprintf('%s', htmlspecialchars($data[2]), htmlentities($data[1]), sprintf('', urlencode($host), htmlentities($data[1]), sprintf('background:#%s', substr(dechex($hash), 0, 6))))); } } } } } return $result; } private static function _getSignalPosition(int $hash, bool $reverse = false, int $padding = 20) { $variant = $reverse ? array_reverse(str_split($hash, 2)) : str_split($hash, 2); $version = 0; do { if (!isset($variant[$version])) return rand($padding, 100 - $padding); // :) $position = $variant[$version++]; } while ($position < $padding || $position > 100 - $padding); return $position; } } ?>
the radio catalog