function get($url, $params=array()){
$url = $url.'?'.http_build_query($params, '', '&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
function getMyPoint() {
return $this->get('https://alimtalk-api.bizmsg.kr/v1/user/balance', array('userid'=>'', 'userkey'=>''));
}
'개발 > php' 카테고리의 다른 글
토스 가상계좌 임금 콜백 php (0) | 2021.04.15 |
---|---|
php key value array push (0) | 2021.04.01 |
php file('abc.txt'); text파일을 라인별 배열로 읽어오는 기능 예제 (0) | 2021.02.23 |
php list 배열을 변수로 변환 예제 (0) | 2021.02.22 |
php 파일 복사 copy 예제 example (0) | 2021.02.22 |
댓글