More details
First thanks to rec370 for posting the basic idea and a sample script. Using his script and a few other resources, I was able to get this working perfectly. Here's a few links that I used, which other people might find helpful.
1.
http://www.whatsmyip.org/itunesremote/
This link provides the theory and some pretty good setup instructions. Unfortunately, things have changed in newer versions of OS X, and things like file locations, PHP version, etc, have changed. So, some other links below might be helpful.
2.
http://www.simonwhatley.co.uk/setting-up-php-on-mac-osx-10-6-snow-leopard
This describes how to setup PHP on Snow Leopard.I had trouble restarting the webserver from the command line, but rebooting the computer worked for me.
3.
http://www.blackberryforums.com/wifi-hotzone/99413-wifi-lan.html
I had some trouble getting my blackberry to see my local webserver, which is behind a firewall and doesn't have a public IP. This link gave some tips on the need to setup my blackberry as a client of my local LAN (I used the blackberry Wifi setup wizard application).
4. I lost the link, but one thing that was driving me crazy after doing the above was I could browse to the web page from my computer, but still not from my blackberry. There were two things (as I recall) that were problematic:
1) Use Internet Browser or Hotspot browser, rather than Blackberry browser. (I'm not 100% sure about this one, in hind sight).
2) As I was accessing a local resource, I wanted to use the IP address. I tried something like this:
http://192.168.0.5/~MyUserName/remote.php
where 192.168.0.5 was the IP address of my Mac. The trick when using an IP address with a Blackberry is to NOT use http:// prefix. Instead, do this:
192.168.0.5/~MyUserName/remote.php
NOTE: I also found this link
http://code.iamcal.com/php/iTunesRemote/
which looks really interesting. Unfortunately, I wasn't able to follow the link to get the sample script. On the page, the author notes that there are COM interfaces and a Python library one can use from Windows, if you are technically inclined. Finally, I noticed this open source project:
http://itunesremote.sourceforge.net/
which looks to have a Windows version, although I've not tried it.