<?
	  $ch = curl_init();
	  curl_setopt($ch, CURLOPT_URL, $url);
	  curl_setopt($ch, CURLOPT_POST, $is_post);
	  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	  $headers = array();
	  $response = curl_exec ($ch);
      
      //json 형식으로 넘어온 $response를 decode하기
      $obj=json_decode($response,true);
  	  $token = $obj['access_token']; //$response에서 access_token만 꺼내쓰기
  	  echo $token;
?>

+ Recent posts