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).'条
成功推送:'.$result['success'].'条
--------------------------------------
'. implode("
", $urls)); } else { echo('

推送失败
帮助

'); } ?>