The Philadelphia Eagles hung on for a 13-12 win in Buffalo to reach 11-5 and keep alive their hopes for a No. 2 seed in the NFC playoffs.