query($sql)->fetchAll(); $number = count($article); $n = $total_number - $number; if($n > 0) { $sql = " select Id,title from article where 1 and home = '0' order by Id desc limit {$n} "; $res = $mysql_obj->query($sql)->fetchAll(); for($i=0;$i<$n;$i++) { $article[$number+$i] = $res[$i]; } } function http_request($url, $data = null) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); if (!empty($data)) { curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($curl); curl_close($curl); return $output; } ?>