1. Go to this page and download the library: Download interfax/interfax library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
interfax / interfax example snippets
use Interfax\Client;
$interfax = new Client(['username' => 'username', 'password' => 'password']);
$fax = $interfax->deliver(['faxNumber' => '+11111111112', 'file' => 'folder/file.pdf']);
// get the latest status:
$fax->refresh()->status; // Pending if < 0. Error if > 0
// Simple polling
while ($fax->refresh()->status < 0) {
sleep(5);
}
$client = new Interfax\Client(['username' => '...', 'password' => '...']);
// Alternative: will utilise environment variables:
// * INTERFAX_USERNAME
// * INTERFAX_PASSWORD
$client = new Interfax\Client();
$fax = $client->outbound->resend($id);
// Interfax\Outbound\Fax sent to the original number
$fax = $client->outbound->resend($id, $new_number);
// Interfax\Outbound\Fax sent to the $new_number
$inbound = $client->inbound;
//Interfax\Inbound
$faxes = $inbound->incoming();
//\Interfax\Inbound\Fax[]
$faxes = $inbound->incoming(['unreadOnly' => true ...]); // see docs for list of supported query params
//\Interfax\Inbound\Fax[]
$document->location;
// or as returned by the API:
$document->uri;
// fluent methods that return the $fax instance
$fax->refresh(); // refreshes the data on the fax object
$fax->cancel(); // cancel the fax, returns true on success
$fax->hide(); // hides the faxes from the fax lists
$image = $fax->image(); // returns Interfax\Image
$new_fax = $fax->resend('+1111111'); // returns a new Interfax\Outbound\Fax
$fax->attributes(); // hash array of fax data properties - see details below
echo $fax->completionTime
echo $fax->duration
...
$fax->attributes();
// fluent methods that return the $fax instance for method chaining
$fax->refresh(); // reload properties of the inbound fax
$fax->markRead(); // mark the fax read - returns true or throws exception
$fax->markUnread(); // mark the fax unread - returns true or throws exception
$fax->resend();
$image = $fax->image(); // Returns a Interfax\Image for this fax
$email_array = $fax->emails(); // see below for details on the structure of this array
$fax->attributes(); // hash array of properties
file
file
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.