PHP randomly get a daily sentence of PowerWord, PowerWord daily a sentence
This paper introduces the method of PHP to get a daily sentence of PowerWord randomly. Share to everyone for your reference. The implementation method is as follows:
Header (' content-type:text/html; Charset=utf-8 '), $nowyear =date ("Y"), $nowmouth = Date (' m '), $nowday = Date (' d '); $date = Mt_rand ("", $nowyear). " -". Mt_rand (" 1 ", $nowmouth)." -". Mt_rand (" 1 ", $nowday); $content =file_get_contents (' http://open.iciba.com/dsapi/?date= '. $date); $arr =json_ Decode ($content, True);p Rint_r ($arr);
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1029585.html www.bkjia.com true http://www.bkjia.com/PHPjc/1029585.html techarticle php randomly get a daily sentence of PowerWord, PowerWord daily An example of this article tells the PHP random get a daily sentence method. Share to everyone for your reference. ...