<p>To answer your question, it is legal if you do it right. There is a Meta.stackoverflow question that goes into some of the details, and gives a list of sites that do such:</p>

<p><a href="http://meta.stackexchange.com/questions/24611/is-it-legal-to-copy-stack-overflow-questions-and-answers">http://meta.stackexchange.com/questions/24611/is-it-legal-to-copy-stack-overflow-questions-and-answers</a></p>

<p>That's an edge-case, though likely infringing. I'll poke some of the SE people who check into these things.</p>

<p>Edit: Looks like a bad site. <a href="http://meta.stackexchange.com/a/121253/131633">Reported</a>.</p>