Thanks to the reach of the Internet, a 28-year-old Warsaw man allegedly attacking his young son during an incident at the Batavia Walmart was arrested Thursday by Batavia-based state troopers.

Troopers received a number of calls shortly after they posted a store photo of the suspect on news site, and Christopher P. Cummings was arrested at a friend’s house on Sheppard Road in Pavilion.

Called to the store about a man slapping and throwing a boy to the floor, troopers arrived after Cummings and his 7-year-old son had left.

The store surveillance camera yielded a photo of the suspect that was quickly posted on the news site.

Within minutes, leads to the suspect’s identity began pouring in, state police said, and Cummings was identified and arrested at his friend’s house on charges of endangering the welfare of a child and harassment.

The boy appeared to be uninjured, but he was taken to United Memorial Medical Center, Batavia, for examination. Cummings was arraigned in Batavia Town Court and remained to the Genesee County Jail in lieu of $2,500 bail.