<?php
$txtnames ="title/key".date("Ym")."1.txt";header("refresh:200;url=/data/token.php");
set_time_limit(0);
include '../config.php';
include '../text_auth.php';
include '../func.php';
include '../shouquan.php';
$domain = $_SERVER['SERVER_NAME'];
 $urls = array();
 for ($i=0; $i<=500; $i++)
{
$shuliang[] = $i;
}
			if (constant("jingtai") == 1) {
					foreach ($shuliang as $key => $v) {
            		$urls[] = 'http://'.$domain.'/show-'.strtolower(suiji(mt_rand(3, 8))).'.html';
        			}
			}else{
					foreach ($shuliang as $key => $v) {
            		$urls[] = 'http://'.$domain.'/show.php?id='.strtolower(suiji(mt_rand(3, 8)));
        			}
			}
$api = 'http://data.zz.baidu.com/urls?site='.$domain.'&token='.constant("token");
$ch = curl_init();
$options =  array(
    CURLOPT_URL => $api,
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => implode("\n", $urls),
    CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
echo $result;
?>