'{$stime}' and type=1 and order_status>0 and red_money>red_open_money"; $stmt = $_PDO->prepare($sql); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($result as $k=>$v){ $params = array(); $params['user_id'] = $v['user_id']; $params['type'] = 4; //4 3小时过期 $params['money'] = $v['red_money']; $push_res = curl_post( ACT_PUSH_URL, $params); } # curl调用接口push function curl_post($url, $params){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); $response = curl_exec($ch); curl_close($ch); return $response; }