PHP method to randomly obtain Kingsoft PowerWord's daily sentence, Kingsoft PowerWord's daily sentence_PHP tutorial

WBOY
Release: 2016-07-13 09:46:54
Original
956 people have browsed it

How to randomly obtain a daily sentence from Kingsoft PowerWord in php, a daily sentence from Kingsoft PowerWord

This article describes the method of randomly obtaining a daily sentence from Kingsoft PowerWord in php. Share it with everyone 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);

Copy after login

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1029585.htmlTechArticleHow to randomly obtain Kingsoft PowerWord's daily sentence in php. Kingsoft PowerWord's daily sentence is an example of how php can randomly obtain Kingsoft PowerWord. PowerWord’s daily sentence method. Share it with everyone for your reference. Tool...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template