• warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.

Creating a php proxy for flash

So I'm planning on updating my photobucket samples, but I wanted a live flash file on my site instead of the crappy static image I had before. Unfortunaly since the coverflow component requires access to the BitmapData to create the reflection, loading any external images will throw an error. Since Photobucket doesn't have a crossdomain.xml file yet, the best way to do this is with a simple php proxy to trick flash into thinking it was loaded from your own domain. Since php is one of those languages I use, but not enough to remember the exact syntax I went searching online.The best example of this I could find was here. There were a few things missing from the script but not a lot. The one major thing I added support for was to verify that the request was coming from the same domain (Sorry but I don't want everyone cutting and pasting my code and flooding my host with proxy requests and I'm sure you wouldn't want the same either). Once the proxy is in place usage is simple. in order to load an image from photobucket: http://yourserver.com/proxy.php?url=http%3A//www.photobucket.com/some/link/to/image/image.jpg Anyway here is my modified php code for a simple proxy: proxy_php
Your rating: None Average: 3 (3 votes)

Comments

[...] and of course you will

[...] and of course you will need developer keys from Photobucket in order for this to work. Also since Photobucket does not have a crossdomain.xml yet, so you’ll need a local proxy if you want to use the coverflow container. I detailed a very basic one in an earlier post. [...]