I don’t think that there are webhooks for badges, so you’d need a plugin to do that. You could use the data explorer plugin to do a query that would give you the badges and access that query with the API.
Why do you want them in you php web site? There may be a way to solve that problem without copying to the database.