NEW YORK (AP) -- To say Scott Hartnell's hat trick played out the way he pictured would hardly be true.
The location wasn't ideal and the goals weren't all highlight-reel material, but the Philadelphia Flyers forward will take it just the same.
"It probably would've been cooler at home to see all the hats flying on the ice," he said. "I'll take them where I can get them."
Combined with a one-goal, two-assist effort in Philadelphia's 4-1 win at Atlanta on Tuesday, Hartnell has six points in two games.
"When you get a goal, they seem to come in bunches," said Hartnell, who totaled four goals in his previous 16 games. "The first one was a lucky one. You'll take those any day of the week. The third one, I made a nice move and put it in.
"Most importantly, it was a big two points for us," he said.
The Rangers are 0-4-1 in their past five and have been outscored 20-10 in the skid. They have dropped into a last-place tie in the Atlantic Division with the New York Islanders, who have played two fewer games, and are ninth in the Eastern Conference.
Philadelphia leads New York by three points.
The Rangers grabbed a 2-0 lead in the first period on a rare pair of goals from hard-hitting forward Ryan Hollweg but that was gone midway through the second.
"We handed this game over," coach Tom Renney said. "Tonight we had no chance. ... We allowed them to take over the game."
Simon Gagne pushed the Philadelphia lead to 6-2, scoring a power-play goal with five minutes left. It was his first game since Nov. 7 when he was forced out for the second time with post-concussion symptoms. He sat out 30 games.
"After the first I recovered pretty quick and I started to feel a little bit better in the second and third," Gagne said. "I got hit twice pretty hard, a couple close to the head, and I responded pretty good. I passed my first test."
Hollweg posted his first multigoal game in the NHL after not scoring at all for 67 games. He has five career goals in 173 games.
"Me getting two goals is ... whatever," Hollweg said. "The basic thing is we want to get wins."
Hartnell gave Philadelphia a 3-2 lead 10:42 into the second, stretched the advantage to two just as a Philadelphia power play was about to expire at 1:54 of the final period and netted his third at 8:49 when he took a long pass from Steve Downie and sneaked a shot past Henrik Lundqvist.
That capped another long night for the Rangers' goalie, who allowed at least four goals for the eighth time in 14 outings after doing that once in the previous 24.
"I don't know what happened," Lundqvist said. "We were off to a really good start. It slipped out of our hands and we never got it back."
Niittymaki made his third straight start as a goalie controversy is brewing with No. 1 netminder Martin Biron. He made 39 saves and has stopped 120-of-125 in the three games.
"It's not a big deal or anything," Niittymaki said. "We're starting to win some games, and whoever is playing next game hopefully we will win."
The tide started to turn late in the first period when the Rangers took three straight penalties to set up an extended stretch of five-on-three play.
Brandon Dubinsky went off for hooking with 1:40 remaining in the period, Blair Betts joined him in the box 1:16 later after shooting the puck over the glass and Chris Drury was whistled for throwing his stick to defenseman Dan Girardi.
"I didn't know the rule. That's not an excuse, that's my fault," Drury said.
New York killed off Dubinsky's penalty starting the second, but the Flyers still had 1:17 left of a two-man power play. Knuble took advantage 40 seconds into the period when he deflected in a shot by Richards.
The Flyers couldn't cash in on the rest of the power play, but by then they had taken momentum and crispness away from the Rangers.
On a dump-in behind the New York net, Jim Dowd outraced everyone to the loose puck at the end boards to Lundqvist's left to negate icing. Lundqvist came out to try to provide pressure, but Dowd wasn't impeded. He swept the puck back past Lundqvist into the slot to Ruzicka, who let go a shot as Rangers defenseman Michal Rozsival failed to get in his way and instead bumped Lundqvist as the puck slid in to make it 2-2 at 8:45.
Lundqvist had no one to blame 1:57 later when Hartnell flung the puck from below the goal line to the goalie's right and banked the shot in off his left skate.
Hollweg made it 1-0 at 4:43 of the first and doubled New York's lead 2:59 later with his second of the season.
Gagne has five goals this season after leading the Flyers last season with 41 goals. ... Hollweg hadn't scored since last Feb. 9. ... Hartnell's previous hat trick was for Nashville against Chicago on Feb. 4, 2006.