웹자료
getresponse api 붙이기 겟리스폰스 php
꿀식사
2017. 3. 27. 10:00
api 키 받기
https://www.getresponse.kr/
getresponse 이용시 api로 캠페인 유저 등록할때 씁니다...
3.0 -ㅅ-은 해봐도안되서 2.0으로 붙이니 되네요...
https://github.com/GetResponse/DevZone/blob/master/API/lib/jsonRPCClient.php
[*] 소스
include('jsonRPCClient.php');
$api_key = 'api키';
$api_url = 'http://api2.getresponse.com';
$client = new jsonRPCClient($api_url);
$campaigns = $client->get_campaigns(
$api_key,
array (
'name' => array ( 'EQUALS' => '캠페인명' )
)
);
$CAMPAIGN_ID = array_pop(array_keys($campaigns));
$author = "이름";
$email = '이메일주소';
$result = $client->add_contact(
$api_key,
array (
'campaign' => $CAMPAIGN_ID,
'name' => $author,
'email' => $email
)
);