Php 如何从curl获取url?
我想生成与文件的链接 我有一个保险费帐户 这是我的密码Php 如何从curl获取url?,php,curl,Php,Curl,我想生成与文件的链接 我有一个保险费帐户 这是我的密码 $request_url = 'https://www.tusfiles.net/bitbh7nh0wg'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.tusfiles.net/?op=login&login=XXXXX&password=XXXX'); curl_setopt($ch, CURLOPT_POST, true); curl_se
$request_url = 'https://www.tusfiles.net/bitbh7nh0wg';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.tusfiles.net/?op=login&login=XXXXX&password=XXXX');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$store = curl_exec($ch);
curl_setopt($ch, CURLOPT_URL, $request_url);
$content = curl_exec($ch);
$regex='|<a.*?href="(.*?)"|';
preg_match_all($regex,$content,$parts);
$links=$parts[1];
foreach($links as $link){
echo $link."<br>";
}
curl_close($ch);
echo$内容;返回什么?非工作echo$内容;我想返回链接下载