这是一个网站,我正在尝试使用curl获取下载链接。 首先,我尝试这样的事情
$data2 = 'fs_csrf='. $fs_csrf[1] . '&DownloadForm%5Bpwd%5D=&ajax=download-form&undefined=undefined';
$curl->post('https://www.fshare.vn/login',$data2);
$curl->get('https://www.fshare.vn/login');
但是evething不起作用。重新加载fshare.vn/login时。它没有给我下载链接。 然后我尝试:
$data2 = 'fs_csrf='. $fs_csrf[1] . '&DownloadForm%5Bpwd%5D=&ajax=download-form&undefined=undefined';
$data_string = json_encode($data2);
echo "{$data2}";
$url ='https://www.fshare.vn/download/get';
$ch = curl_init('https://www.fshare.vn/download/get');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$jsresult = curl_exec($ch);
echo "{$jsresult}";
但它仍然不起作用
请帮帮我!谢谢!