This lineup won a million dollars on DraftKings (Screenshot provided by Alvin Zeidenfeld)

Al Zeidenfeld is living every daily fantasy football players dream.

He turned a $20 entry (one of many he had that day) into his first ever seven-figure payday Sunday, beating more than 277,000 entries to win DraftKings Millionaire Maker tournament, earning him a $1 million cash prize.

“That was one of the last mountains I had to climb in daily fantasy – win a $1 million first prize in tournament. It’s exciting, it’s relief and an accomplishment all at the same time,” Zeidenfeld said in an interview with The Post.

Daily fantasy leagues like DraftKings and Fanduel are built on similar principles to traditional fantasy football leagues. But instead of being tied to players all season long, owners build their teams weekly using a pre-determined roster structure and must fit players under a salary cap, with each player assigned a weekly price. Typically, the higher the dollar amount, the better the player — but it takes more than that to build a million-dollar roster. You have to takecalculated risks and employ game theory to generate enough points to win the big prize.

And of course, you need to do your homework. Zeidenfeld, who was dubbed the Tim Duncan of daily fantasy sports by Maxim magazine, starts his fantasy football research for the upcoming week before the current slate of game’s is even complete.

“I start on Mondays, and without any research I look at salaries on DraftKings and come up with a first-look lineup,” he said. “No research – just the teams I think are soft defensively versus a position, players’ increased workload, teams that will play up in pace. Kind of like Carolina versus San Francisco.”

Chip Kelley, who was hired as coach of the 49ers this offseason, is known for his up-tempo offense. During his time with the Eagles, his team ran the most offensive plays in the NFL. But because they played at a faster tempo, that allowed the opposing team to also get extra opportunities, thus putting them in a position to create more opportunities for fantasy points. And it wasn’t a negligible number – from 2013 to 2015, the Eagles allowed 3,411 plays to the opposition, almost 200 more than the No. 2 team, the Jacksonville Jaguars (3,276).

“Then I start setting lineups on Wednesday and finish them off on Thursday morning. On Friday I build all my lineups for Sunday.”

Zeidenfeld offers clues as to who will be included in his lineups in his weekly column on ESPN as well as on his podcast “The Daily Fantasy Football Edge,” which is sponsored by DraftKings. However, because Zeidenfeld is an independent contractor and not a DraftKings employee, he is free to enter DFS contests without restriction.

Two players that set the tone for Zeidenfeld’s winning lineup were Cam Newton and Kelvin Benjamin, combining for seven catches for 108 yards and two touchdowns. Newton is widely considered one of the top quarterback options in fantasy football, but at less than 10 percent ownership, not many entrants capitalized on his big outing.

“Apparently I was contrarian with Cam Newton who I felt was the number one quarterback on the board. People tend to pay down at quarterback, and for good reason, but when the Panthers are expected to score a lot, it is going to come from Cam Newton because he is so very tied to their touchdown scoring.”

This year Newton is 100 percent of the scoring: he has all five passing touchdowns and the team’s lone rushing touchdown. As for Benjamin, recent research has shown that the strongest positively correlated stack is a passer with his No. 1 wide receiver. For example, a QB/WR1 stack produces in excess of 50 daily fantasy points 15.3 percent of the time, more than twice the frequency of a quarterback paired with the No. 2 receiver on his team.

“You need every player on your team to go off to win the Millionaire Maker,” explains Adam Levitan, who’s co-hosted the Edge podcast with Zeidenfeld since its start in 2014. “But if your quarterback goes off, most likely one or more of his targets will go off, too, so it makes sense to have a QB-WR stack in there.”

Zeidenfeld also highlighted Travis Benjamin in his most recent ESPN column, who, in his mind, was the most likely to “slide into the Keenan Allen role as the most targeted outside player in the Chargers’ offense.” True to form, Benjamin was tied for most targets on the team in Week 2 (six), catching all six for 115 yards and two touchdowns.

Another productive selection for Zeidenfeld was Denver’s defense, which he chose for its ability to generate a pass rush.

“The greatest predictor of defensive touchdowns is the ability to pressure the quarterback,” Zeidenfeld explained. “Defensive pressure leads to hurried throws, which leads to sacks, which leads to fumbles, which can be scooped up in the end zone. Hurried throws leads to interceptions, which on out-routes can lead to touchdowns, too.”

Only owned by 4.6 percent of the entries, the Broncos allowed just 20 points to Indianapolis and had two defensive touchdowns, making them extremely valuable in DFS formats.

“You want to pay down at defense because there is a lot of variance at the position, but I could afford all the players I wanted in my core and still have room for the Broncos defense,” Zeidenfeld said. “I had about 40 percent exposure to [Denver] across all of my tournaments lineups, but the field had under 5 percent. Why wouldn’t you play the best defense at home against a team with a low total with a poor offensive line and a quarterback that turns over the ball a ton?”

Zeidenfeld didn’t even have his top running back choice, C.J. Anderson, on his million-dollar lineup. He instead had Arizona’s David Johsnson and New England’s LeGarrette Blount.

There are two kinds of games for Blount: the good kind — in which the Patriots have a sizable lead — and the games when the Patriots are trailing and you want to avoid him. Luckily for Zeidenfeld, the Patriots got a strong effort from backup quarterback Jimmy Garoppolo before losing him to injury in the first half.

“What was surprising to me was that a chalky lineup won the Millionaire Maker,” Levitan said. “That’s usually pretty rare. Al had a lot of conviction on Cam and Kelvin, and a lot of conviction on the Broncos defense and Travis Benjamin. His lowest owned player was [Antonio] Gates, at 3.6 percent. Al plays a lot of chalk. He doesn’t go too far off the board. It was more the case of him having a lot of convictions on the best plays this week.”

One of Zeidenfeld’s convictions — and undoubtedly the most rewarding —  was his the decision to make a late swap of running back Eddie Lacy for wide receiver Stefon Diggs in the flex spot. And this is where game theory comes in.

DraftKings allows you to swap a player out as long as you have the roster spot available and his game has not yet begun. By knowing how many players your opponents have left — information that is public to tournament entrants on the DraftKings website — you could make strategic decisions as to who gives you the most upside to move ahead in the standings. For Zeidenfeld, that meant saying goodbye to running back Eddie Lacy of the Packers.

“Between the end of the 4 p.m. games and the Sunday night game, I saw I was in 18oth place out of 277,000 entires, and everybody in front of me that had 60 player minutes remaining had a tight end spot or a defense spot left to play — no one had a running back or wide receiver. While Lacy may have a higher floor from week to week, Diggs’s big-play ability made it more likely that Diggs had a 30-point game than Lacy, and I needed over 30 fantasy points to win.”

Diggs caught all five of his targets for 86 yards in the first half, but needed to convert a touchdown for Zeidenfeld to move into contention for the $1 million. Then, with 2:16 left in the third quarter, Diggs did his part and found the end zone.

“Typing words was hard for me at that point,” Zeidenfeld said. “You could see me sweating this game in real time.”

But Diggs’s 25-yard score did not get Zeidenfeld first place. He would need Diggs to make one more catch — and avoid doing anything that could remove him from the game — to secure the win. Diggs did both. After making a 15-yard catch late in the fourth quarter, Diggs was flagged for unsportsmanlike conduct.

Seven minutes of game time took about 30 minutes to elapse in real time. But for someone who could win $1 million based on the outcome, it felt like an eternity. A huge windfall and becoming the first daily fantasy sports player (according to Zeidenfeld) to win six-figure prizes in four different sports — football, basketball, baseball and golf — helps keeps things in perspective.

“It’s fun. It’s much easier to sweat your guy than root for punts,” Zeidenfeld  said. “It’s not fun to root for punts.”