2017 © Pedro Peláez
 

library php-sfax

PHP client for Scrypt's Sfax service.

image

rootwork/php-sfax

PHP client for Scrypt's Sfax service.

  • Saturday, November 19, 2016
  • by rootwork
  • Repository
  • 3 Watchers
  • 1 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 21 % Grown

The README.md

php-sfax

PHP client for Scrypt's Sfax service., (*1)

Installation

composer require rootwork/php-sfax

Usage Examples

Create the Client Instance

<?php
$sfax = new Rootwork\Sfax\Client(
    'https://api.sfaxme.com/api',
    'YOURUSERNAME',
    'YOURAPIKEY',
    'YOURENCRYPTIONKEY',
    'YOURIV'
);

Send a Fax from a PDF or TIF File

<?php
$result = $sfax->sendFax(
    'Malcolm Reynolds',
    '19999999999',
    '/path/to/file.pdf'
);

if ($result->isSuccess) {
    $queueId = $result->SendFaxQueueId;
}

Send a Fax from a URL

<?php
$result = $sfax->sendFaxFromUrl(
    'Malcolm Reynolds', 
    '19999999999',
    Rootwork\Sfax\Client::FORMAT_TIF,
    'https://www.yoursite.com/getFile?token=ABC123&file=12345678.tif'
);

Download Inbound Faxes

<?php
$result = $sfax->receiveInboundFax();

foreach ($result->InboundFaxItems as $fax) {
    $fileData = $sfax->downloadInboundFaxAsPdf($fax->FaxId);
    file_put_contents("/faxes/$fax->FaxId.pdf", $fileData);
}

Running Tests

Tests can be run using composer helper scripts, test or testdox, depending on your output preferences., (*2)

composer install
composer test
composer testdox

Code coverage reports are written to build/., (*3)

The Versions

19/11 2016

dev-develop

dev-develop https://github.com/rootworkit/php-sfax

PHP client for Scrypt's Sfax service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Soule

php scrypt fax rootwork sfax hipaa

19/11 2016

dev-master

9999999-dev https://github.com/rootworkit/php-sfax

PHP client for Scrypt's Sfax service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Soule

php scrypt fax rootwork sfax hipaa

19/11 2016

1.0.0

1.0.0.0 https://github.com/rootworkit/php-sfax

PHP client for Scrypt's Sfax service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Soule

php scrypt fax rootwork sfax hipaa