query("SELECT `id` FROM `lylme_links` WHERE `link_pwd` = 0"); while ( $site = $DB->fetch($sites)) { $url = siteurl().'/site-'.$site['id'].'.html'; array_push($urls,$url); } $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/html'), ); curl_setopt_array($ch, $options); $results = curl_exec($ch); $httpCode = curl_getinfo($ch,CURLINFO_HTTP_CODE); echo $results; if($httpCode == 200){ $result = json_decode($results,true); echo('
>>>>>>Successful
本次推送:'.count($urls).'条推送失败
帮助