Hello everybody,,i am completly new in php(i'm a java;) programmer)and i need a help for creating a counter, i have a pdf file on the server and if someone has a counter that does the following:
-when someone clicks on the pdf file ,the counter stores the clicks times value in a txt file,,
<a href=simple.pdf>click here</a>

so i can read that txt file with my java program to show the clicks times
-----------------
i found many hit counters but the problem is how can i make them just for the pdf file
---------
i will post that java program when i'm finished form it:) ..

thanx for your help..

The only way that I know of to fire a php file is to open it, generally with a browser. If you go directly to a .pdf file, I have no idea how a php script will be able to detect this action. You could create a php file and serve the .pdf file from that php file. You will find some examples on doing that here:
http://us2.php.net/header

as far as writing to a text file:
http://us2.php.net/manual/en/function.fwrite.php