$remot_file_name = "https://static.upbit.com/upbit-pc/pc_coin_open_popup_images/popup_market_24.png";
function remoteFileExist($filepath) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$filepath);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if(curl_exec($ch)!==false) {
return true;
} else {
return false;
}
}
if(remoteFileExist($remot_file_name) == 1) {
echo "있음";
} else {
echo "없음";
}
?>