PHP Hit counter help!

Where do I place the php files on my webserver? should I place it in the folder ‘cgi-bin’? How about the .swf file and the text files the php file uses?

I am trying to run this example: http://www.kirupa.com/developer/mx/hitcounter.htm