1000){
$today = date("Ymd");
$yesterday = date("Ymd",strtotime("-1 day"));
}else{
$today = date("Ymd",strtotime("-1 day"));
$yesterday = date("Ymd",strtotime("-2 day"));
}
if(!is_file($_SERVER['DOCUMENT_ROOT'].'/data/'.$today.'.txt') || filesize($_SERVER['DOCUMENT_ROOT'].'/data/'.$today.'.txt') < 100){
createBuyPriceFile($today);
}
if(!is_file($_SERVER['DOCUMENT_ROOT'].'/data/'.$yesterday.'.txt') || filesize($_SERVER['DOCUMENT_ROOT'].'/data/'.$yesterday.'.txt') < 100){
createBuyPriceFile($yesterday);
}
//ファイルから読込
$fp = fopen($_SERVER['DOCUMENT_ROOT'].'/data/'.$today.'.txt', 'r');
$data = explode("\t",fgets($fp));
$date = $data[0];
$kin = $data[1];
$pt = $data[2];
$k24 = $data[3];
$k22 = $data[4];
$k216 = $data[5];
$k20 = $data[6];
$k18 = $data[7];
$k14 = $data[8];
$k10 = $data[9];
$k9 = $data[10];
$pt1000 = $data[11];
$pt950 = $data[12];
$pt900 = $data[13];
$pt850 = $data[14];
$sv1000S = $data[15];
$sv925 = $data[16];
$sv = $data[17];
fclose($fp);
//前日ファイル
$fp = fopen($_SERVER['DOCUMENT_ROOT'].'/data/'.$yesterday.'.txt', 'r');
$data = explode("\t",fgets($fp));
$_kin = $data[1];
$_pt = $data[2];
$_k24 = $data[3];
$_k22 = $data[4];
$_k216 = $data[5];
$_k20 = $data[6];
$_k18 = $data[7];
$_k14 = $data[8];
$_k10 = $data[9];
$_k9 = $data[10];
$_pt1000 = $data[11];
$_pt950 = $data[12];
$_pt900 = $data[13];
$_pt850 = $data[14];
$_sv1000S = $data[15];
$_sv925 = $data[16];
$_sv = $data[17];
fclose($fp);
//前回日非
$kin_p = (int) str_replace(",","", $kin) - (int) str_replace(",","", $_kin);
$pt_p = (int) str_replace(",","", $pt) - (int) str_replace(",","", $_pt);
$k24_p = (int) str_replace(",","", $k24) - (int) str_replace(",","", $_k24);
$k22_p = (int) str_replace(",","", $k22) - (int) str_replace(",","", $_k22);
$k216_p = (int) str_replace(",","", $k216) - (int) str_replace(",","", $_k216);
$k20_p = (int) str_replace(",","", $k20) - (int) str_replace(",","", $_k20);
$k18_p = (int) str_replace(",","", $k18) - (int) str_replace(",","", $_k18);
$k14_p = (int) str_replace(",","", $k14) - (int) str_replace(",","", $_k14);
$k10_p = (int) str_replace(",","", $k10) - (int) str_replace(",","", $_k10);
$k9_p = (int) str_replace(",","", $k9) - (int) str_replace(",","", $_k9);
$pt1000_p = (int) str_replace(",","", $pt1000) - (int) str_replace(",","", $_pt1000);
$pt950_p = (int) str_replace(",","", $pt950) - (int) str_replace(",","", $_pt950);
$pt900_p = (int) str_replace(",","", $pt900) - (int) str_replace(",","", $_pt900);
$pt850_p = (int) str_replace(",","", $pt850) - (int) str_replace(",","", $_pt850);
$sv1000S_p = (int) str_replace(",","", $sv1000S) - (int) str_replace(",","", $_sv1000S);
$sv925_p = (int) str_replace(",","", $sv925) - (int) str_replace(",","", $_sv925);
$sv_p = (int) str_replace(",","", $sv) - (int) str_replace(",","", $_sv);
if($kin_p >0){$kin_p = '+' . $kin_p;}
if($pt_p >0){$pt_p = '+' . $pt_p;}
if($k24_p >0){$k24_p = '+' . $k24_p;}
if($k22_p >0){$k22_p = '+' . $k22_p;}
if($k216_p >0){$k216_p = '+' . $k216_p;}
if($k20_p >0){$k20_p = '+' . $k20_p;}
if($k18_p >0){$k18_p = '+' . $k18_p;}
if($k14_p >0){$k14_p = '+' . $k14_p;}
if($k10_p >0){$k10_p = '+' . $k10_p;}
if($k9_p >0){$k9_p = '+' . $k9_p;}
if($pt1000_p >0){$pt1000_p = '+' . $pt1000_p;}
if($pt950_p >0){$pt950_p = '+' . $pt950_p;}
if($pt900_p >0){$pt900_p = '+' . $pt900_p;}
if($pt850_p >0){$pt850_p = '+' . $pt850_p;}
if($sv1000S_p>0){$sv1000S_p = '+' . $sv1000S_p;}
if($sv925_p >0){$sv925_p = '+' . $sv925_p;}
if($sv_p >0){$sv_p = '+' . $sv_p;}
function createBuyPriceFile($day){
//https://www.net-japan.co.jp/system/price/js/libs/config.js
$url = "https://www.net-japan.co.jp/system/upload/netjapan/export/price_{$day}_0930.json";
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false);
$str = curl_exec($ch);
$json = json_decode($str);
if(strlen($str) <= 1000){
for($i=1; $i <= 10; $i++){
$targetTime = strtotime($day);
$oldDay = date('Ymd', strtotime('-'.$i.' day', $targetTime));
$url = "https://www.net-japan.co.jp/system/upload/netjapan/export/price_{$oldDay}_0930.json";
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false);
$str = curl_exec($ch);
$json = json_decode($str);
if(strlen($str) >= 1000){
break;
}
}
}
//更新日
$date = convGtJDate($day);
// $rate = array(97.1, 88.2, 86.6, 80.7, 74.5, 55.5, 38.0, 34.5, 97.2, 92.2, 88.6, 83.7, 92.0, 82.5);
$rate = array(98, 93, 88.1, 86.5, 75, 56.16, 38.14, 34, 97, 92, 90, 85, 94, 84);
//金
$kin = $json->data->nj_buy->ingod->au->price;
$kin_bace = str_replace(',', '', $kin);
//プラチナ
$pt = $json->data->nj_buy->ingod->pt->price;
$pt_bace = str_replace(',', '', $pt);
//シルバー
$sv = $json->data->nj_buy->ingod->ag->price;
$sv_bace = str_replace(',', '', $sv);
//K24
$k24 = floor($kin_bace*$rate[0]/100);
//K22
$k22 = floor($kin_bace*$rate[1]/100);
//KK216
$K216 = floor($kin_bace*$rate[2]/100);
//K20
$k20 = floor($kin_bace*$rate[3]/100);
//K18
$k18 = floor($kin_bace*$rate[4]/100);
//K14
$k14 = floor($kin_bace*$rate[5]/100);
//K10
$k10 = floor($kin_bace*$rate[6]/100);
//K9
$k9 = floor($kin_bace*$rate[7]/100);
//Pt1000
$pt1000 = floor($pt_bace*$rate[8]/100);
//Pt950
$pt950 = floor($pt_bace*$rate[9]/100);
//Pt900
$pt900 = floor($pt_bace*$rate[10]/100);
//Pt850
$pt850 = floor($pt_bace*$rate[11]/100);
//Sv1000S
$sv1000S = floor($sv_bace*$rate[12]/100);
//Sv925
$sv925 = floor($sv_bace*$rate[13]/100);
//ファイル書き込み
$w_file = fopen($_SERVER['DOCUMENT_ROOT'].'/data/'.$day.'.txt', 'a');
$fp = $date."\t";
$fp .= $kin."\t";
$fp .= $pt ."\t";
$fp .= number_format($k24)."\t";
$fp .= number_format($k22)."\t";
$fp .= number_format($K216)."\t";
$fp .= number_format($k20)."\t";
$fp .= number_format($k18)."\t";
$fp .= number_format($k14)."\t";
$fp .= number_format($k10)."\t";
$fp .= number_format($k9) ."\t";
$fp .= number_format($pt1000)."\t";
$fp .= number_format($pt950)."\t";
$fp .= number_format($pt900)."\t";
$fp .= number_format($pt850)."\t";
$fp .= number_format($sv1000S) ."\t";
$fp .= number_format($sv925) ."\t";
$fp .= number_format($sv);
fwrite($w_file, $fp);
}
function convGtJDate($src) {
$year = substr($src, 0, 4);
$month = substr($src, 4, 2);
$day = substr($src, 6, 2);
if (!@checkdate($month, $day, $year) || $year < 1869 || strlen($year) !== 4 || strlen($month) !== 2 || strlen($day) !== 2) return false;
$date = $src;
$gengo = '令和';
$wayear = $year - 2018;
$wadate = $gengo.sprintf("%02d", $wayear).'年'.$month.'月'.$day.'日';
return $wadate;
}
?>
高価買取実績
-
買取価格¥750,000
磨き
-
買取価格¥200,000
七福神
-
珊瑚買取価格¥165,000
龍彫刻
-
買取価格¥92,000
赤猿
-
買取価格¥680,000
エクスプローラⅡ216570
-
買取価格¥1,235,000
デイデイト18238 旧ダイヤ
-
買取価格¥95,000
ルイヴィトン ノマドライン ドクターバッグ
-
買取価格¥485,000
コンビ ダイヤ リング
ラフテルは豊富な流通ルートを活かして最高の価格で販売できるため、お客様に対して常に最高の買取金額を提示することが可能です。
ラフテルの買取サービスは、手数料や送料がかかりません。全て無料ですので、安心して査定のご相談をいただければと思います。
スタッフの接客の良さはお客様に大変好評です。ラフテルは、お客様に気持ちよくサービスを受けてもらうための努力を惜しみません。
- どれくらいで査定時間かかりますか?
-
物にもよりますが、数分で終わります。
査定自体は数分で終わりますが、お客様がよくわからないうちに買い取られてしまったという事が無いようにしっかり説明させて頂いておりますのでお時間頂ければと思ってます。
- 出張査定はいつでも来ていただけますか?
-
お客様のご予定に合わせてお伺いさせて頂きます。まずは、お問い合わせください。
- 宅配キットは使わないといけませんか?
-
お客様自身で梱包して頂いて問題ないです。
品物、身分証のコピー、買取査定依頼書を同封して送って下さい。
- 手数料はかかりますか?
-
手数料は一切かかりません。
目減り、送料、事務手数料、などの理由で減額する事は一切ありません。