<?php

require 'vendor/autoload.php';
use Plivo\RestAPI;
$auth_id = "Your AUTH_ID";
$auth_token = "Your AUTH_TOKEN";
$p = new RestAPI($auth_id, $auth_token);
# To record a call
$params = array('call_uuid' => "xxxxxxxxxxx", 'time_limit' => '40', 'callback_url' => "https://example.com/record_action/", 'callback_method' => "GET", 'transcriptionType' => 'auto', 'transcriptionUrl' => "https://example.com/transcription/", 'transcriptionMethod' => 'GET');
$resp = $p->record($params);
print_r($resp);
# To stop recording a call
$params = array('call_uuid' => "xxxxxxxxxxx");
$resp = $p->stop_record($params);
print_r($resp);
# To record a conference call
$params = array('conference_name' => "demo", 'callback_url' => "https://example.com/record_action/", 'callback_method' => "GET");
$resp = $p->record_conference($params);
print_r($resp);
# To stop recording a conference call
$params = array('conference_name' => "demo");
$resp = $p->stop_record_conference($params);
print_r($resp);