Dai un'occhiata qui

http://freephp.html.it/articoli/view_articolo.asp?id=75