So my question is what is the easiest way to go about scraping a Stack Exchange forum "recent questions" and display them in the side bar of a wordpress site?
2 Answers
Use an RSS feed widget and grab the RSS feed of the SE site. In the case of this site: https://wordpress.stackexchange.com/feeds/
Use the stack exchange API http://api.stackexchange.com/docs along with WordPress' HTTP related functions:
- http://codex.wordpress.org/HTTP_API
wp_remote_get()
- http://codex.wordpress.org/Function_API/wp_remote_getwp_remote_retrieve_body()
- http://codex.wordpress.org/Function_API/wp_remote_retrieve_body
... and finally cached for good measure.