function _xbbcode_one_time_code in Extensible BBCode 6
Same name and namespace in other branches
- 5 xbbcode-misc.php \_xbbcode_one_time_code()
2 calls to _xbbcode_one_time_code()
File
- ./
xbbcode.inc, line 78
Code
function _xbbcode_one_time_code($text) {
// find an internal delimiter that's guaranteed not to collide with our given text.
do {
$code = md5(rand(1000, 9999));
} while (preg_match("/{$code}/", $text));
return $code;
}