It would be legal and it could happen. However, it's not likely. In states where it is not legal for the elector to vote opposite of election results, the elector would just pay small fine if he/she chose to do so.
From the link:
“If they all vote the way their states voted, Donald Trump will win,” the petition states. “However, they can vote for Hillary Clinton if they choose. Even in states where that is not allowed, their vote would still be counted, they would simply pay a small fine – which we can be sure Clinton supporters will be glad to pay! We are calling on the Electors to ignore their states’ votes and cast their ballots for Secretary Clinton.”
http://www.msn.com/en-us/news/politi...z&OCID=DELLDHP