The alarm clock program written by PHP

Source: Internet
Author: User

? PHP

//Alarm Clock procedure

error_reporting(7 );

ob_start ();

if (!isset ($i )) {

$msg= ' Now time is: '. Date (' h:i:s '). "<BR> go to bed." ;

$t= time();

Refresh($msg,"funny.php?i=1&t1= $t",5 );

}elseif ($i= =1 ) {

$msg= ' Now time is: '. Date (' h:i:s ' );

$t 2= time ();

$t 3=$t 2-$t 1 ;

$msg. ="<BR> You sleep $t 3 seconds, it's time to get up" ;

Refresh($msg,' funny.php?i=2 ' );

}elseif ($i= =2 ) {



//

Print <<<eot2



&lt;object id= "MediaPlayer1" width= "", "height=" classid= "Clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"





Codebase= "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"





align= "Baseline" border= "0" standby= "Loading Microsoft Windows Media Player components ..."





type= "Application/x-oleobject" &gt;





&lt;param name= "invokeurls" value= "0" &gt;





&lt;param name= "FileName" value= "Http://218.30.20.121:5699/huyanbin/MuSiC/HuAnson08.Wma" &gt;





&lt;param name= "Showcontrols" value= "1" &gt;





&lt;param name= "showpositioncontrols" value= "0" &gt;





&lt;param name= "Showaudiocontrols" value= "1" &gt;





&lt;param name= "Showtracker" value= "1" &gt;





&lt;param name= "showdisplay" value= "0" &gt;





&lt;param name= "ShowStatusBar" value= "1" &gt;





&lt;param name= "AutoSize" value= "0" &gt;





&lt;param name= "Showgotobar" value= "0" &gt;





&lt;param name= "showcaptioning" value= "0" &gt;





&lt;param name= "AutoStart" value= "1" &gt;





&lt;param name= "playcount" value= "0" &gt;





&lt;param name= "Animationatstart" value= "0" &gt;





&lt;param name= "Transparentatstart" value= "0" &gt;





&lt;param name= "Allowscan" value= "0" &gt;





&lt;param name= "Enablecontextmenu" value= "1" &gt;





&lt;param name= "clicktoplay" value= "0" &gt;





&lt;param name= "Defaultframe" value= "DataWindow" &gt;








&lt;embed src= "Http://218.30.20.121:5699/huyanbin/MuSiC/HuAnson08.Wma" align= "Baseline" border= "0" width= "350" height= "68"





type= "Application/x-mplayer2"





Pluginspage= "Http://www.microsoft.com/isapi/redir.dll?prd=windows&amp;amp;sbp=mediaplayer&amp;amp;ar=media &amp;amp;sba=plugin&amp;amp; "





name= "MediaPlayer" showcontrols= "1" showpositioncontrols= "0"





showaudiocontrols= "1" showtracker= "1" showdisplay= "0"





showstatusbar= "1"





autosize= "0"





showgotobar= "0" showcaptioning= "0" autostart= "1" autorewind= "0"





animationatstart= "0" transparentatstart= "0" allowscan= "1"





enablecontextmenu= "1" clicktoplay= "0"





defaultframe= "DataWindow" invokeurls= "0" &gt;





&lt;/embed&gt;





&lt;/object&gt;





EOT2;

}


function refresh($msg=',$url, $time = ' 3 ' ){

echo $msg. "<BR>" ;

echo "<meta http-equiv=refresh content=" $time; url= $url ">" ;



}

?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.