PHP/MySQL Authentication





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

« Previous 1 2 3 4 5 6 7 8 9  ...  14 15 Next »
9
Date Submitted Fri. Oct. 14th, 2005 5:06 PM
Revision 1
Helper lilleman
Tags Files | Folders | List | PHP
Comments 1 comments
Get a List of Folders and/or Files
23
Date Submitted Fri. Oct. 14th, 2005 5:12 PM
Revision 1
Helper lilleman
Tags Folder | PHP | Size
Comments 1 comments
Get the Size of a Folde
5
Date Submitted Fri. Oct. 21st, 2005 9:52 AM
Revision 1
Coder mattrmiller
Tags PHP | Random | String
Comments 1 comments
Random String
28
Date Submitted Tue. Nov. 8th, 2005 4:53 AM
Revision 1
Beginner jelena
Tags Image | PHP | Thumbnail
Comments 8 comments
Create a Thumbnail
21
Date Submitted Fri. Nov. 11th, 2005 2:51 PM
Revision 1
Beginner Possibility
Tags Paragraph | PHP | String
Comments 0 comments
Proper Paragraphs
7
Date Submitted Mon. Nov. 28th, 2005 4:35 PM
Revision 1
Beginner Michael
Tags Extract | PHP
Comments 3 comments
Using the extract() Functio
-7
Date Submitted Fri. Feb. 17th, 2006 4:52 AM
Revision 3
Helper mercutio
Tags mysql
Comments 0 comments
I use this method for keeping my sql templates away from my code.

You can extend upon the idea, as I have done in the past, by placing SQL handing classes between your scripts and the template library.

Things to note here:

The lesser userd heredoc string method. The reason this is used is to keep the SQL clear and well laid out, and not as messy as using quotes.

vsprintf() is a very handy function if you don't want to hard code the number of parameters to interpolate your string with.

The use of sprintf templates offers you additional security. For example, only allowing numbers to be placed where a %d falls. This, of course, shouldn't be the only security on user supplied variables, but comes in extra handy for debugging purposes.

Regarding the TODO in there, it would take a check of the number of % placeholders there are in the template. One caveat is remembering to remove the count of %%'s that appear (the literal percentage).
11
Date Submitted Fri. Feb. 17th, 2006 1:14 PM
Revision 1
Coder mattrmiller
Tags "Magic Quotes" | PHP | Slashes | Strip
Comments 1 comments
This only seems appropriate, we were fighting with a similar issue this morning.
11
Date Submitted Fri. Feb. 17th, 2006 4:49 PM
Revision 1
Beginner RRSands
Tags CSharp | Encryption | Security
Comments 0 comments
From RSA Security's website:
"RC4 is a stream cipher designed by Rivest for RSA Data Security (now RSA Security). It is a variable key-size stream cipher with byte-oriented operations. The algorithm is based on the use of a random permutation. Analysis shows that the period of the cipher is overwhelmingly likely to be greater than 10^100. Eight to sixteen machine operations are required per output byte, and the cipher can be expected to run very quickly in software. Independent analysts have scrutinized the algorithm and it is considered secure."

This implementation encodes the byte stream to be encrypted "in-place".

Example:
Byte[] Key = new Byte[5] { 12, 34, 22, 12, 32 };
Byte[] B = new Byte[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
// Examine B array before and after this next call.
RC4(ref B, Key);
// Examine B array before and after this next call.
RC4(ref B, Key);
8
Date Submitted Sun. Feb. 19th, 2006 2:27 PM
Revision 2
Coder mattrmiller
Tags PHP | Referrer | Validate
Comments 6 comments
Fixed missing $ sign.
« Previous 1 2 3 4 5 6 7 8 9  ...  14 15 Next »