Home » Php » find value from API callback url

find value from API callback url

Posted by: admin October 20, 2018 Leave a comment


I am using an API for sending sms in my site. As per their documentation, the API structure is as follows:


the message sending part is OK. But I am confused with Callback url. My function for callback is as follows:

public function sendMessageCallback() {        

    $responseBody = file_get_contents('php://input');  

    $data = array('value' => $responseBody, 'date' => date('Y-m-d h:i:s'));
    $this->db->insert('test1', $data);

and so my api call is like

But nothing is written to DB.