<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->sendFax($toNumber, array(), array('callback_url' => $customCallback, 'string_data' => $textData, 'string_data_type' => 'text'));
var_dump($result);
コード例 #2
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
//enter a batchId to close
$batchId = 23;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->closeBatch($batchId);
var_dump($result);
コード例 #3
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->sendFax($toNumber, array(), array('string_data' => $htmlData, 'string_data_type' => 'html'));
var_dump($result);
コード例 #4
0
ファイル: faxCancel.php プロジェクト: balgf/phaxio-php
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->faxCancel($faxId);
var_dump($result);
コード例 #5
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$faxId = 1234;
$outfile = "/tmp/out.jpg";
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$phaxio->download($faxId, Phaxio::THUMBNAIL_SMALL, $outfile);
コード例 #6
0
ファイル: sendFiles.php プロジェクト: balgf/phaxio-php
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
# Create files and put their names here
$files = array('files/coverPage.html', 'files/content.pdf');
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->sendFax($toNumber, $files);
var_dump($result);
コード例 #7
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$endDate = time();
$startDate = strtotime("-1 week");
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->faxList($startDate, $endDate, array('number' => '18778275130'));
echo "Retrieved page {$result->getPage()} of {$result->getTotalPages()} ({$result->getTotalResults()} results) \n";
var_dump($result);
コード例 #8
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
echo "Creating a 3 part batch with a one minute delay...\n";
for ($i = 1; $i <= 3; $i++) {
    $result = $phaxio->sendFax($toNumber, array(), array('string_data' => "This is part {$i} of a 3 part fax batch.  This is the first batch.", 'string_data_type' => 'text', 'batch' => true, 'batch_delay' => 60));
    var_dump($result);
    echo "Part {$i} of 3 sent.  Sleeping for 5 seconds...\n";
    sleep(5);
}
echo "First batch created successfully.  Sleeping for 45 seconds and creating a new batch.  First batch will start to send. \n\n";
sleep(45);
echo "Creating a 3 part batch with a one minute delay...\n";
for ($i = 1; $i <= 3; $i++) {
    $result = $phaxio->sendFax($toNumber, array(), array('string_data' => "This is part {$i} of a 3 part fax batch.  This is the second batch.", 'string_data_type' => 'text', 'batch' => true, 'batch_delay' => 60));
    var_dump($result);
    echo "Part {$i} of 3 sent.  Sleeping for 5 seconds...";
    sleep(5);
}
echo "Done.";
コード例 #9
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
for ($i = 1; $i <= 5; $i++) {
    $result = $phaxio->sendFax($toNumber, array(), array('string_data' => "This is part {$i} of a 5 part fax batch.", 'string_data_type' => 'text', 'batch' => true));
    var_dump($result);
}
echo "Your batch has been created for {$toNumber}.  You can now see it in the Phaxio web UI.  To fire it, see fireBatch.php";
コード例 #10
0
<?php

require_once 'phaxio_config.php';
require_once 'autoload.php';
use Phaxio\Phaxio;
//enter a batchId to fire
$batchId = 0;
$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost);
$result = $phaxio->fireBatch($batchId);
var_dump($result);