header("Content-type: text/html; charset=UTF-8"); header("Last-Modified: ".gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Access-Control-Allow-Headers: Content-Type"); header("Pragma: no-cache"); function simple_curl( $url, $postArray=[], $timeout=3 ) { $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => (!$timeout ? 3 : $timeout), CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $postArray, ]); $response = curl_exec($curl); curl_close($curl); return $response; } //쇼핑배너 $arr_json1 = json_decode(simple_curl( 'https://godpick.godpeople.com/ajax.list2list.php', ['task'=>'card_for_challege','limit'=>'20','shuffle'=>'1'] ), true); $jsonBannerData = json_encode($arr_json1['list']); //한줄감사 $arr_json2 = json_decode(simple_curl( 'https://ps.godpeople.com/Thanks/ajax2023_MtsOpenedAll.xxx?num=20' ), true); $jsonThanksData = json_encode($arr_json2); ?>