$_xend = $_xstart + $stepLen - 1; if ($_xend > $curTime) { $_xend = $curTime; } $url = "sitemapinc&start={$_xstart}"; C::t('#baidusubmit#baidusubmit_sitemap')->add($url, 2, $_xstart, $_xend); } //把最后一个加上 $nextTime = $curTime + 1; C::t('#baidusubmit#baidusubmit_sitemap')->add("sitemapinc&start={$nextTime}", 2, $nextTime, $endTime); $newEndTime = $newStartTime - 1; $newUrl = "sitemapinc&start={$startTime}"; C::t('#baidusubmit#baidusubmit_sitemap')->update_by_sid( $sp['sid'], array('url' => $newUrl, 'start' => $startTime, 'end' => $newEndTime)); $endTime = $newEndTime; } } //记录相关数据 $timeLost = intval(1000 * (microtime(true) - $_G['starttime'])); C::t('#baidusubmit#baidusubmit_sitemap')->update_by_sid( $sitemap['sid'], array('item_count' => $itemCount, 'file_size' => $fileSize, 'lost_time' => $timeLost)); baidu_update_url_stat($itemCount);
C::t('#baidusubmit#baidusubmit_sitemap')->add($url, 1, $_xstart, $_xend); } $new_end_tid = $new_start_tid - 1; $new_url = "sitemapall&start={$start_tid}"; C::t('#baidusubmit#baidusubmit_sitemap')->update_by_sid( $sp['sid'], array('url' => $new_url, 'start' => $start_tid, 'end' => $new_end_tid)); $end_tid = $new_end_tid; } break; } echo $output; $fileSize = $fileSizeCheck; $itemCount = $itemCountCheck; if ($tid <= $installmaxtid) { $urlnum ++; } flush(); } echo '</urlset>'; $timeLost = intval(1000 * (microtime(true) - $_G['starttime'])); C::t('#baidusubmit#baidusubmit_sitemap')->update_by_sid( $sitemap['sid'], array('item_count' => $itemCount, 'file_size' => $fileSize, 'lost_time' => $timeLost)); baidu_update_url_stat($urlnum);