$val){ if(trim($val)!=""){ $urls[]=trim($val); } } $postdata=implode("\n", $urls); $api = '替换你的接口'; $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => $postdata, CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); } ?>