function getWeiboData()
{
$count = 15;
// Enter your authorization number after the source parameter
$url = "https://api.weibo .com/2/statuses/home_timeline.json?source=123456789&count=".$count."&page=1";
echo $url.'
';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
//Set whether to display header information. 0 is not displayed, 1 is displayed. The default is 0
//curl_setopt($curl, CURLOPT_HEADER, 0);
//Set cURL parameters, requiring the results to be saved in a string or output to the screen. 0 is displayed on the screen, 1 is not displayed on the screen, the default is 0
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// To be verified Username and password
curl_setopt($curl, CURLOPT_USERPWD, "username:password");
$data = curl_exec($curl);
curl_close($curl);
$result = json_decode($data, true);
echo '
';<br> print_r($result);<br> echo '';