<?php
function apply($data) {
$url = "https://interlogis.kr/api/apply/";
$headers = array('Content-type: application/x-www-form-urlencoded; charset=utf-8');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$contents = curl_exec($ch);
if (curl_errno($ch)) {
$contents = curl_error($ch);
}
curl_close($ch);
return $contents;
}
$item0 = array(
'type' => 1,
's_tcode' => 'SF1279012375092',
'title_kr' => '티셔츠',
'title_en' => 'T-shirt',
'currency' => 'USD',
'price' => 13.8,
'qty' => 4,
'color' => 'red',
'size' => 'M',
'etc_option' => '옵션',
'shop_url' => 'https://Taobao.com/klklsdr2',
'hscode' => '00',
'img_url' => 'https://Taobao.com/klklsdr2/tst.jpg',
'c_memo3' => '00000000',
'item_check' => 2
);
$items = array(
'item0' => $item0
);
$param = array(
'id' => 'gopher0519@gmail.com',
'auth_id' => 9493,
's_point' => 'cn',
'e_point' => 'kr',
'd_type' => 231,
'cert' => 'Y',
'crn' => 'P123456789',
'c_name' => '홍길동',
'c_tel' => '010-0000-0000',
'c_zipcode' => '00000',
'c_addr' => '인천광역시 서구 북항로 177번길 26',
'c_addr2' => 'D동 2층',
'c_charge1' => 2,
'c_charge2' => 1,
'c_memo1' => '빠른 배송부탁드려요',
'c_memo2' => '123456',
'items' => $items
);
$res = apply($param);
echo $res;
?>