Frandsen hit a solo homer in the first and Durham added a two-run shot in the second.
San Francisco also got one RBI from Dan Ortmeier and two runs scored on a key seventh-inning throwing error by Florida reliever Lee Gardner.
Three players had two hits each for the Giants, who have won four in a row.
Florida’s Josh Willingham had three hits, including a solo homer, and two RBI. Miguel Cabrera had two RBI and two hits, and Hanley Ramirez knocked in a run for the Marlins, who stranded 14 runners in their fifth straight loss.
Gardner (3-4) was the losing pitcher.