curl -s -L http://phobos.apple.com/version | gunzip. You'll probably want to pipe it through more, which shows a page at a time, or open the entire results in TextEdit, i.e.
curl -s -L http://phobos.apple.com/version | gunzip | more
curl -s -L http://phobos.apple.com/version | gunzip | open -f
The results are published as standard xml. Since I knew that the European iPhone would ship with version 1.1.2, I set up a shell script a couple of days in advance that searched through this feed to find "1.1.2". Eventually it showed up and I could download the firmware several days in advance of the iTunes release.
Getting such an early head start is truly the exception rather than the rule. This is a good trick to put into your arsenal when you're waiting for a specific release.
Updated to add " curl -s -L ". Thanks Justin.