|Code Listing by Garel Alex|
As you display message on a web page, you have to sanitize input data coming from users to avoid XSS. Here is a small recipe where we can use a special class for our string to be sure we get safe all the way long.
Find a unique name based on a prefix for a content in a container
(eg. a file in a directory) adding a digit to the name
Does it in log2(n) + log2(n/2) were n is the number of duplicates
This would be used eg. in a CMS?...
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.