Why not search the forums before you ask a question like this? Searching the forums would be quicker and cause less fustration because people being too lazy to search. Here is a link to some code that I have written...http://forums.cpanel.net/showthread.php?t=31121