Well, PHP will not be able to see if the user has watched the whole video, if the video is stuck loading, etc.
You could try something like...
And then echo out the SWF... However, this will also prevent the rest of your site from loading - anything below the video.
You could also use PHP in the following way...
PHP:
<html>
<!-- header / stuff here -->
<?php if(!isset($_GET['swf']) || $_GET['swf'] !== 'true'){ $swf = false; ?>
<!-- your video that auto starts playing -->
<?php } else { $swf = true; ?>
<!-- your swf here -->
<?php } ?>
<!-- footer / stuff here -->
</html>
<?php
if($swf !== true){ // first time here - watching video...
sleep(15); // don't do anything for 15 seconds
echo "<script>window.location.href='yourpage.php?swf=true';</script>"
}
?>
This would get the job done, but if the video doesn't load fully for the user or its slow or they find a way to pause it, your page will redirect with PHP before they finish the video. JavaScript is much better
🙂
Your best bet is to do something with JavaScript. You can detect video plays/stops/timing/etc & automatically load other content in (your SWF) right afterwards. I highly recommend using JS and not PHP for this.