How to determine the last 1k blocks and their Miner Software? Basically the idea was to create a tiny service such as nodecounter.com.

Now I would appreciate your help on the following questions:


How to determine the Software (Core, Classic, XT, etc.) and quantity on the whole network?
How to determine the last 1k blocks and their Miner Software?


I would start from scratch, but if you know about any open source projects, preferably in NodeJS or PHP, I would really appreciate a hint.
How to determine the Software (Core, Classic, XT, etc.) and quantity
  on the whole network?


connect to host and take the 'user-agent' string from 'version' packet


  How to determine the last 1k blocks and their Miner Software?


the miner can be determined by analyzing coinbase transaction.

the software can not be determined