YGGwave~
the radio hub
%s',
self::_getSignalPosition($hash),
self::_getSignalPosition($hash),
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($hash, $padding = 20) {
$variant = 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 hub