$apiKey = "asdsadsdasd";
$url = 'https://csp.ecom.com/rest/017/'.$apiKey; //호출 URL 지정 $post_v["NUM"] = "01011112222"; // $post_v["ey"] = "skfhk";
$curl = curl_init (); curl_setopt ($curl, CURLOPT_URL, $url); curl_setopt ($curl, CURLOPT_POST, 1); curl_setopt ($curl, CURLOPT_POSTFIELDS, $post_v); curl_setopt($curls, CURLOPT_PROXY, "127.0.0.1:443"); // 아이피 등록. url은 같지만 가 다른경우 예) 테스트서버, 운영서버 등 curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); $res = curl_exec ($curl);
var_dump($res); //결과값 출력 print_r(curl_getinfo($curl)); //모든정보 출력 echo curl_errno($curl); //에러정보 출력
curl_close($curl);
|