Given a URL (or a long string containing the page source) for a bulletin board's list of threads, return an array/s containing the following for each thread on the page:
- Thread title
- Thread URL
- Number of posts in thread
- Number of views (if present)
- Last post's date (as standardized date/time, not string) (if present)
- Thread preview text (if present, including mouseover/alt)
Code should work with as many board configurations as possible. Automagic flexibility and/or easy extensibility a plus! Following is an example list of URLs, all of which must parse correctly. Try not to hard-code for each one, think flexibility.
[login to view URL] (custom?, flat layout)
[login to view URL] (custom, flat layout)
[login to view URL] (custom? flat layout)
[login to view URL] (custom)
[login to view URL] (vB 2.2.8)
[login to view URL] (vB 3.0.3)
[login to view URL] (phpBB 2.0.8)
[login to view URL] ([login to view URL] 6.7.2)
[login to view URL] (WowBB 1.61)
[login to view URL] (IdealBB 0.1.5.3)
[login to view URL] (WebBoard 7)
[login to view URL] (vB 2.3.5)
[login to view URL] (ASP Playground 2.4.1)
[login to view URL] ([login to view URL] 6.2.3)
[login to view URL] ([login to view URL] 6.5b6)
[login to view URL] (custom?)
[login to view URL] (neoforums 0.8.2e)
[login to view URL] (custom?)
[login to view URL] (BestBBS 3.15)
[login to view URL] (WWWThreads 5.4.3php)
[login to view URL] (phpBB 2.0.2)
[login to view URL] (vB 3.0.1)
[login to view URL] (Invision 1.3)
[login to view URL] ([login to view URL] 6.7.0)
[login to view URL] (uBB.x)
PHP strongly preferred (regexp heavy OK, obviously), but will review bids for perl or C/C++ as well.
Please provide a short code sample with your bid for style review. (Doesn't have to do anything in particular.)
Questions welcome. I'm looking for a quality solution.