コード例 #1
0
<?php

// Download the library and copy into the folder containing this file.
require_once '/path/to/vendor/autoload.php';
// Loads the library
use Twilio\Twiml;
$response = new Twiml();
$response->enqueue(["workflowSid" => "WW0123456789abcdef0123456789abcdef"])->task("{'account_number':'12345abcdef'}");
print $response;
?>

<!-- alternatively -->

<?php 
$workflowSid = "WW0123456789abcdef0123456789abcdef";
header('Content-Type: application/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
    <Enqueue workflowSid="<?php 
echo $workflowSid;
?>
">
        <Task>{"account_number": "12345abcdef"}</Task>
    </Enqueue>
</Response>
コード例 #2
0
<?php

// Download the library and copy into the folder containing this file.
require_once '/path/to/vendor/autoload.php';
// Loads the library
use Twilio\Twiml;
$response = new Twiml();
$response->enqueue(array('workflowSid' => 'WW0123456789abcdef0123456789abcdef'))->task("{'account_number':'12345abcdef'}", array('priority' => 5, 'timeout' => 200));
print $response;
?>

<!-- alternatively -->

<?php 
$workflowSid = "WW0123456789abcdef0123456789abcdef";
header('Content-Type: application/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
    <Enqueue workflowSid="<?php 
echo $workflowSid;
?>
">
        <Task priority="5" , timeout="200">{"account_number": "12345abcdef"}</Task>
    </Enqueue>
</Response>
コード例 #3
0
<?php

// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php';
use Twilio\Twiml;
$response = new Twiml();
$response->enqueue('Queue Demo');
echo $response;
コード例 #4
0
<?php

// Download the library and copy into the folder containing this file.
require_once '/path/to/vendor/autoload.php';
// Loads the library
use Twilio\Twiml;
$response = new Twiml();
$response->enqueue(array('workflowSid' => 'WW0123456789abcdef0123456789abcdef'));
print $response;
?>

<!-- alternatively -->

<?php 
$workflowSid = "WW0123456789abcdef0123456789abcdef";
header('Content-Type: application/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
    <Enqueue workflowSid="<?php 
echo $workflowSid;
?>
"/>
</Response>
コード例 #5
0
<?php

// Download the library and copy into the folder containing this file.
require_once '/path/to/vendor/autoload.php';
// Loads the library
use Twilio\Twiml;
$response = new Twiml();
$response->enqueue(array('workflowSid' => 'WW0123456789abcdef0123456789abcdef', 'waitUrl' => '/hold_music.php', 'action' => '/post_bridge_survey.php'))->task("{'account_number':'12345abcdef'}");
print $response;
?>

<!-- alternatively -->

<?php 
$workflowSid = "WW0123456789abcdef0123456789abcdef";
header('Content-Type: application/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
    <Enqueue workflowSid="<?php 
echo $workflowSid;
?>
" , waitUrl="/hold_music.php" ,
             action="/post_bridge_survey.php">
        <Task>{"account_number": "12345abcdef"}</Task>
    </Enqueue>
</Response>