<?php
	// 取得IP表
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, "https://tp60.appleseotw.com/api/appleip.json");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$lines_string = curl_exec($ch);
	curl_close($ch);

	if (file_put_contents("appleip.json", $lines_string) === false) {
		echo "<p style='color:#f00;'>更新IP表失敗!</p>";
	} else {
		echo "<p style='color:#00f;'>更新IP表成功!</p>";
	}
?>