Home

Change the cursor in JavaScript

Just a simple JavaScript function to change the cursor /** * Posible options * * auto * crosshair * default * pointer (hand) * help * move * text * wait * e-resize, w-resize, n-resize, s-resize, ne-resize, nw-resize, se-resize, sw-resize * * onmouseover="changeCursor('crosshair');" */ function changeCursor(style) { document....

Read more

Generate a random string in PHP

I created this class primarily to generate random salts for passwords, but it can be used quite easily to create random strings of any length that you specify. <?php /** * clsSalt * * @package * @author Satal Keto * @copyright 2008 * @version v1.00.002 * @access public */ class clsSalt { ...

Read more

Sending an email in PHP

This class was written to allow for me to send an email from PHP easily. The class allows for the message to be sent as either plain text or HTML. <?php /** * clsEmail * * @package * @author Satal Keto * @copyright 2008 * @version v1.00.001 * @access public */ class clsEmail { ...

Read more

Hashing with a salt in PHP

Heres a class I wrote a long time ago to come up with a simple way of ensuring that I used a common method for hashing passwords with salts in a particular way. <?php /** * clsHash * * @package * @author Satal Keto * @copyright 2008 * @version v1.00.001 * @access public */ class clsHash ...

Read more

How to mark method as obsolete

While working on my upcoming library, I was adding some old code that I had created and realised that the way I had done one of the methods wasn’t appropriate. While as this is during the writing of version 1 of my framework I thought rather than to just change the code and forget about all backwards compatibility, I would make the old method ob...

Read more

Track number of times a file is downloaded

Being able to track how many times a file has been downloaded from your website is a useful bit of information. One method of doing this is by making it so that the user is instead of being sent directly to the file is sent to a web page which then sends the user the file. I haven’t added any code that figures out where the file is stored on th...

Read more

Applying multiple namespaces to a class

Something that I’ve seen a few people do when they want to create a library that has namespace’s is to actually nest the namespace’s in their code. Namespace System     Namespace security         Namespace Cryptography             Public Class MyNewClass             End Class         End Namespace     End Namespace End Namespace IMHO this loo...

Read more

Get a value back from a dialog form

One thing that commonly comes up on forums, is people asking how they can get information back from a modal form. What a lot of people seem to forget is that a form is just another object, the same rules apply to it as any other object that you create in .Net. The most commonly used method for getting some information about the state of an obje...

Read more