Using bitcoind:
./bitcoind getblockcount
=> returns something like 258345
./bitcoind getblockhash 258345
=> returns the hash of the latest block like 000000000000001bca1bfe721ecf4fb6480835d966762bc840689ed86642c7b6
./bitcoind getblock 000000000000001bca1bfe721ecf4fb6480835d966762bc840689ed86642c7b6
=> returns the block in JSON format
Another possibility, use my service:
http://coinplorer.com/BTC ; I'm currently improving the importation delays and will soon offer a push API to be notified of new blocks (websockets).
Coinplorer importation status can be found here:
http://coinplorer.com/Console/Status2, updated in real time (but still some delay between importations, will be solved very soon).
If the blockchain changes (because I don't wait for the confirmations to come), the previous blocks gets deleted and replaced by the new ones!