flush();
}
$k = 0;
foreach ($fileArray as $key => $value) {
    //echo ("$value<br/>");
    $object->Init_Image($dir . $value . ".gif", $value);
    $k++;
    if (true) {
        echo "processing {$value} {$k} / {$i}...<br/>";
        ob_flush();
        flush();
    }
}
/* check database */
if (false) {
    $object->Output_Database();
}
echo "import success<br/>database count = " . count($object->Resource) . "<br/><br/>";
ob_flush();
flush();
/* request resource */
function curl_request($url, $post = '', $cookie_file = '', $fetch_cookie = 0, $referer = '', $timeout = 10)
{
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("Expect:"));
    curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)');
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($curl, CURLOPT_AUTOREFERER, 1);
    curl_setopt($curl, CURLOPT_REFERER, $referer);
    if ($post) {