Generate a random ID





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

23
Date Submitted Thu. Oct. 5th, 2006 11:49 AM
Revision 1
Helper Idlemind
Tags mysql | PHP
Comments 1 comments
"Today in the news, MySQL previews..."

As a "preview" of text, this MySQL select will return the first few words out of a text field in a database. It returns entire words (doesn't cut them off in the middle) and follows the last word with an elipse "..."

In the PHP, assign $CharactersToDisplay to a number - the approximate number of characters desired (or you can hard-code it if you want).

For the example, I also use $TheID as the row identity for the record to display.
-11
Date Submitted Thu. Sep. 28th, 2006 3:43 PM
Revision 1
Helper ffxfiend
Tags "php" | PHP | phpcode | RegExp
Comments 1 comments
This is a faily simple function to validate a URL being passed into your scripts. It will allow for http, https, and ftp. The beginning www. of a URL is optional as well. It will also validate if you have an IP address in place of the domain name. I'm sure this can be improved upon as this is my first attempt at regular expressions but it has worked good for me so far. Please comment or improve if your able.

Thanks!
12
Date Submitted Sun. Sep. 24th, 2006 5:43 PM
Revision 1
Helper kahotep
Tags HTML | PHP
Comments 6 comments
Generates select boxes, text boxes, check boxes and radio buttons. Via a handful of functions.
15
Date Submitted Sun. Sep. 24th, 2006 5:35 PM
Revision 1
Helper kahotep
Tags Form | HTML | PHP
Comments 1 comments
Generates a tree view within a dropdown select box.
9
Date Submitted Sat. Sep. 23rd, 2006 5:53 AM
Revision 1
Beginner vbdotnetboy
Tags "Random Generation" | .Net | VB.NET
Comments 1 comments
Description:
Call one of the overloaded functions and a you will have a randomly generated password.

Generate() - Will generate a password 13 or (more/less) characters in length ranging from A-Z a-z 0-9 and other characters such as @ # %... etc.

Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer)
Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char) - Allows you to set your ASCII range if you wish not to include number for example.

Generate(ByVal ExcludeValues As String()) - Works like Generate() buts characters passed in the array will not be used to generate the password.

Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer, ByVal ExcludeValues As String())
Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char, ByVal ExcludeValues As String()) - Works like Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer) & Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char), but allows you to also exclude characters that you do not wish the generator to use.



UPDATE
03/06/2006: Included use of Phill64's TrueRandom2 class for generating random numbers. Also overloaded the constructor so that a length can be set for the password, if the length is not set the default is set to 13.
5
Date Submitted Wed. Sep. 20th, 2006 9:18 AM
Revision 1
Helper RaX
Tags PHP
Comments 0 comments
Returns an array of folder/file names in the specified path.
13
Date Submitted Tue. Sep. 19th, 2006 7:11 PM
Revision 1
Helper RaX
Tags PHP
Comments 10 comments
This little function will split an e-mail address passed to it at the @ sign, and make sure that there is a valid e-mail server at the other end =)
11
Date Submitted Tue. Sep. 19th, 2006 7:09 PM
Revision 1
Helper RaX
Tags PHP
Comments 0 comments
This will give you CheckDNSRR functionality in windows.

This function is only natively available in php while running on Linux.
10
Date Submitted Mon. Sep. 18th, 2006 7:26 PM
Revision 1
Helper ffxfiend
Tags mysql | PHP
Comments 0 comments
Here is a pair of function to use in combination. The first one will change newlines into tags to store into a database. The second one does the reverse so you can edit the content of the database without having the tags show when you edit the content. If you can find improvements or have comments please let me know
13
Date Submitted Mon. Sep. 18th, 2006 5:13 AM
Revision 1
Helper nothingless
Tags forcodegrrl | PHP
Comments 3 comments
For those times you need to do a loop in PHP, but have the outcome be in descending order (ie, start at 10 and end at 1).