<?php
/**
 * Upgrow Push Token Gönderici Controller
 * @author Can Yiğit KAV
 */
class ControllerMarketingPush extends Controller {
    public function store() {
        $curl = curl_init();

        curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://smart.upgrow.ist/api/v1/push_tokens?api_token=FR89CCj4edSgm4t0S3WboPLFmUu2C5gAN4ROc6seQFA9sAt39gt3yETOIdDE',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS => array('token' => $this->request->post['token']),
        ));

        $response = curl_exec($curl);

        curl_close($curl);
        echo $response;

    }

}
