A homeless Filipino boy has been inundated with aid after a photo of him doing his homework on a street corner under the dim light from a McDonald's sign went viral on social media.

College student Joyce Torrefranca took the photograph of nine-year-old Daniel Cabrera last month in the city of Mandaue on Cebu island, uploading it on Facebook with the caption: "I got inspired by a kid."

The photo was shared over 8,000 times, and was subsequently featured on local news media, prompting many to donate cash, school supplies and even a college scholarship, AFP reported.

"We're overjoyed. I don't know what I will do with all of these blessings," his mother, Christina Espinosa, told AFP on Friday.

Espinosa and her three youngest children, including Daniel, have been living in her employer's grocery store next to the McDonald's seen in the photo since her shanty home was burned five years ago. She makes 80 pesos ($1.77) a day at the store and as a servant at the home of the store's owner.

Daniel's father died in 2013, Espinosa said.

"He is a very studious and determined boy... He would insist on going to school even without his lunch money because I have no money to give," Espinosa told AFP.

Thanks to the donations, Espinosa said, Daniel will be able to fulfill his current dream: Becoming a policeman.

I got inspired by a kid