Post to Twitter?

In an earlier post you said:

Everytime the Arduino writes something (anything) this sketch opens a connection to your PHP script. (We don't really care what the PHP script does or says so we don't bother reading the stream.)

What would I need to do if I did want to read the contents? Let's say there was a text file that would either contain the character 1 or 2. Can processing get the contents of a text file and do something based on that?

Thanks.