InnerEyes’ main page is written in ASP actually, not PHP. I know ASP way better, so I can write something in a hour that might take a day with PHP.
In short, and if you don’t mind skipping some of the error-handling with blanket on error resume next
statements, the left column of the page is probably about a days work.
The trick is preventing the page from reading each and every blog every time someone loads the page – that’ll kill the server eventually. InnerEyes is set to refresh every 5 minutes – it just stores the last time a database refresh was done in a table, and checks that table every time the page is loaded. If it’s been over 5 minutes, it’ll re-query all the blog databases directly for posts and comments, and it stores all that info in another table. If it hasn’t been 5 minutes yet, it just reads the existing information from that same table.
In theory, a simple thing to do. In practice, you do have to put a little effort into making sure that the information you receive from the blogs is what you’re looking for (so you need to calculate the GMT timezone from the server’s timezone and limit your query so you don’t get future-dated posts, you need to ignore drafts, you need to ignore moderated comments, etc.).
Technically, using the blog’s RSS feed is safer, since it will already have filtered out everything (it only displays published posts, approved comments, etc.), but it’s really slow for more than a few blogs. InnerEyes originally used RSS, but the update for 20 blogs took almost a minute. So I rewrote it to query the blog databases directly and now it checks 75 blogs in 1 second ??