Blair Betts added an empty-netter for the Flyers (5-1-1) with 38 seconds left and Brian Boucher stopped 32 shots.
Derek Roy scored on a 2-on-1 at 17 seconds of the third period for the Sabres (3-2-0).
Van Riemsdyk made it 2-0 more than 6 minutes later as he beat a defender to a rebound of a shot by Matt Carle and pushed it past Miller's glove side.
Philadelphia entered the game 0 for 18 on the power play.
The Flyers play the Sabres in Buffalo on Sunday for their final preseason game, then open the regular season in Pittsburgh on Oct. 7. Buffalo begins the next day at Ottawa.
NOTES: Zherdev changed the spelling of his first name, asking the team to use a "y" at the end, rather than the "i" that was used for his first five seasons.
|PPG - Nikolay Zherdev (1) Wrist shot - ASST: Claude Giroux (1), Kimmo Timonen (1)|
1 - 0 PHI
|PPG - James van Riemsdyk (1) Wrist shot - ASST: Matthew Carle (1), Jeff Carter (1)|
2 - 0 PHI
|Derek Roy (1) Backhand shot - ASST: Drew Stafford (1), Mark Parrish (1)|
2 - 1 PHI
|EN - Blair Betts (1) Snap shot - ASST: Jeff Carter (2)|
3 - 1 PHI
|Power Play %||13.4%||23.4%|
|% on Road||12.2%||18.6%|
|% at Home||14.5%||28.0%|
|Darroll Powe Hi-sticking - 2 min against Derek Roy|
|Ryan Miller served by Zack Kassian Delaying Game-Puck over glass - 2 min|
|Rob Niedermayer Hooking - 2 min against Scott Hartnell|
|Braydon Coburn Hooking - 2 min against Tyler Ennis|
|Nikolay Zherdev Roughing - 2 min against Nathan Gerbe|
|Nathan Gerbe Slashing - 2 min against Nikolay Zherdev|
|Drew Stafford Hooking - 2 min against Claude Giroux|
|Nathan Gerbe Hi-sticking - 2 min against Nikolay Zherdev|
|Shaone Morrisonn Tripping - 2 min against Mike Richards|
|Michael Grier served by Mark Parrish Unsportsmanlike conduct - 2 min|
|Michael Grier Misconduct (10 min) - 10 min|
|Matthew Carle Tripping - 2 min against Drew Stafford|
|Andreas Nodl Hooking - 2 min against Tyler Ennis|
|Daniel Carcillo Tripping - 2 min against Steve Montador|
|Nikolay Zherdev Hi-sticking - 2 min against Derek Roy|
|Derek Roy Hi-sticking - 2 min against Nikolay Zherdev|