Dynamically generate flash stuff

Hey, you know flashbuttons.com? The page automatically generates flash buttons for you, the way you want. Their script is made in cgi…so i’mm not really sure. Is there a way to do this in php? I know ming can make flash stuff…but not as kool/complicated/nice as the ones that are on flashbuttons.com