Hello, I need a script that will be programed to play a video in my server in a certain time. E.g. I upload the video sample.flv to my server - www.example.com/sample.flv and I want this video start playing at Monday 28 February 2010 10:00 AM but none can pause or stop the video, like a webtv. If someone know one script that could do this job or can write one, please reply here PS. Sorry for my poor english
You can do an if statement and check the current time with your defined time, then echo a player containing the video.
there are lots of free players for videos, google it... your main problem here is setting the date of playing dynamically... retrieve the date then do an if else statement whether to play it or not..
<?php $defined_time = "25 February 2010 03:26 PM"; if(date("d/m/Y h:i A", time()) == date("d/m/Y h:i A", strtotime($defined_time))){ //insert an embed code for your player... echo "Play the player..."; } else { echo "Streaming is not available yet!"; } ?> PHP: