Flash accepting and sending variables

How can I make Flash accept a numerical variable from a webpage and send the variable back to a webpage? Something like a counter, which counts the number of times the Flash is loaded.

I want Flash to read a numerical value maybe from a txt file(any other ways?), add 1 to it, and send it back to a PHP script.