Skip to content

Instantly share code, notes, and snippets.

@timjb
Created April 6, 2010 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timjb/357552 to your computer and use it in GitHub Desktop.
Save timjb/357552 to your computer and use it in GitHub Desktop.
<?php
if(!isset($url)) return '';
$name = dechex(rand(0, 12345678));
return <<< EOT
<div id=swfcontainer{$name}></div>
<script>
// requires MooTools
window.onload = function() {
var swf = new Swiff('{$url}', {
container: 'swfcontainer{$name}',
width: 700,
height: 526
});
};
</script>
EOT;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment