1
dolorain 2023-03-03 13:36:25 +08:00
让我这个 php 菜鸟试试:
<?php $data = file_get_contents('https://tenapi.cn/v2/video/?url=https://v.douyin.com/6BEYVNs'); $toJson = json_decode($data); echo $toJson->data->music->url; |
2
mht 2023-03-03 13:38:12 +08:00
$result = file_get_content("https://tenapi.cn/v2/video/?url=https://v.douyin.com/6BEYVNs");
$json = json_decode($result,true); if($json){ echo $json['data']['url']; }else{ echo '数据解析失败'; } |
3
w910621 OP @mht Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
报这个错 |
4
vibbow 2023-03-03 16:23:01 +08:00
下载这个文件:
https://curl.se/ca/cacert.pem 然后把他放到服务器上,php.ini 里添加下面两句 (路径设置到你放到的位置) curl.cainfo = "D:\PHP\Shared\cert\cacert.pem" openssl.cafile = "D:\PHP\Shared\cert\cacert.pem" |
5
zddwj 2023-03-03 17:48:38 +08:00 via Android
百度啊,这个又不是什么偏门的问题,边做边想,然后碰到问题继续搜,总会解决的
|