I've stitched up Sina's API to get some data from Weibo. This is the link I have pieced together:
Https://api.weibo.com/2/statuses/repost_timeline.json?id=3681834027857481&page=1&count=100&access_ Token=2.00oa6w2chiarmb96820f87ebenjkee
If you enter this link directly in the browser, the roommate data, but: if I use the Crul function, but I do not get
Here is my function: (Note: That is the link above the line)
$ch = Curl_init ();
2. Set request options, including specific URLs
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_returntransfer, 1);
curl_setopt ($ch, Curlopt_header, 0);
3. Perform a curl session and get related replies
$response = curl_exec ($ch);
4. Release the curl handle and close a curl session
Curl_close ($ch);
I print out the $response value is false, solve the big God
Reply to discussion (solution)
Plus
curl_setopt ($ch, Curlopt_ssl_verifypeer, 0);
Protocol Header HTTPS
Curl turns on certificate validation by default
So it should be closed.
Plus
curl_setopt ($ch, Curlopt_ssl_verifypeer, 0);
Protocol Header HTTPS
Curl turns on certificate validation by default
So it should be closed.
You can do it your way, thank you.