Mike Potter, currently with Adobe, has posted his PHP gallery/Flex integration script illustrated in this example.
I have (finally!) got around to publishing the source code for my PHP Gallery / Flex integration. You can see it in action on WickedDemo.com.
Here's the resources:
He also notes that you can visit the front end to the Gallery and "view source" to check out the code for it. It uses AMFPHP to create the integration.