The free api interface of jokes includes dynamic images of picture segments
Interface address: http://api.xiaoliaoba.cn/Index/duanzi.html
Supported formats: JSON/xm
Request method: GET/POST
Joke categories: duanzi (jokes), tupian (pictures), gif (dynamic pictures)
Request example: http://api.xiaoliaoba.cn/Index/duanzi.html?count=10&page=1&key=APPKEY
Request parameters:
Name Type Required Description
key string is API KEY
count Int No The number of data obtained on a single page, the default is 10
page Int No Get the data of the specified page, the default is 1
PHP code example: <?php <br />
$curl = curl_init();<br>
curl_setopt_array($curl, array(<br>
CURLOPT_URL => "http://api.xiaoliaoba.cn/Index/duanzi.html?key=APPKEY",<br>
CURLOPT_RETURNTRANSFER => true,<br>
CURLOPT_ENCODING => "",<br>
CURLOPT_MAXREDIRS => 10,<br>
CURLOPT_TIMEOUT => 30,<br>
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,<br>
CURLOPT_CUSTOMREQUEST => "GET",<br>
));<br>
$response = curl_exec($curl);<br>
$err = curl_error($curl);<br>
curl_close($curl);<br>
if ($err) {<br>
echo "cURL Error #:" . $err;<br>
} else {<br>
echo "<pre class="brush:php;toolbar:false">";<br>
var_dump(json_decode($response,true));<br>
}</pre>
JSON return example: {<br>
"error_code": 0,<br>
"reason": "Success",<br>
"result": [{<br>
"title": "If descendants are unfilial",<br>
"content": "If my future children are unfilial, then before I die, I will call them to my side and tell them: In fact, I have 5 million. I hid it in..., and then drive west to seek death for those bastards." . ",<br>
"type": "1",<br>
"updatetime": "2016-01-22 09:14"<br>
},<br>
{<br>
"title": "You think everyone is like you",<br>
"content": "Two days ago, I was chatting in a game group and a girl said she was getting married. Her friends gave her all kinds of blessings. Then someone suddenly said that the girl was getting married before she turned 20, and she also said yes. Why are you getting married at such a young age? But someone next to me said, "You think everyone is an old woman with two wheels and you can't get married?" ,<br>
"type": "1",<br>
"updatetime": "2016-01-22 00:09"<br>
}]<br>
}
Please visit http://www.xiaoliaoba.cn/api for details

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version