curlでアクセスする:httpsエンドポイント
$url = "https://test.idiot.com/preregister/data?phone=15756892356" ;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$result = curl_exec($ch);
print_r($result);画像をクリックして直接ダウンロードする
1.バックエンドの応答に追加:headerヘッダー:
header('Content-type: image/png')header("Content-Disposition: attachment; filename='xxxx.png'")
2.フロントエンド:a タグに追加:download属性
eg:<a href="large.jpg" download>ダウンロード</a>