ali baba.... u better search google, or http://phpclasses.org people have done this a trillion times.... :D