function _xbbcode_one_time_code in Extensible BBCode 5
Same name and namespace in other branches
- 6 xbbcode.inc \_xbbcode_one_time_code()
2 calls to _xbbcode_one_time_code()
File
- ./
xbbcode-misc.php, line 67
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;
}