Php randomly obtains a daily sentence for Kingsoft, and a daily sentence for Kingsoft. Php randomly obtains the daily sentence of Kingsoft Mac. The Daily sentence of Kingsoft Mac describes how php randomly obtains the daily sentence of Kingsoft Mac. Share it with you for your reference. With php, you can randomly obtain a daily sentence for Kingsoft, and a daily sentence for Kingsoft
This example describes how php randomly obtains a daily sentence of Kingsoft. Share it with you for your reference. The specific 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 ("2012", $ 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); print_r ($ arr );
I hope this article will help you with php programming.
Examples in this article describes how php randomly obtains a daily sentence of Kingsoft. Share it with you for your reference. With...