iivannov / interfax
Very simple client for InterFax SOAP API
Installs: 2 221
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-11-17 02:51:07 UTC
README
Very simple client for InterFax SOAP API. For the moment it supports only sending simple text faxes and sending faxes with file attachment. It's easily extensible to add other InterFax methods.
Install
Via Composer
$ composer require iivannov/interfax
Usage
$interfax = new InterFax($username, $password); //send a text $message to the given $number $interfax->sendText($number, $message); //send a fax with file attachment to the given $number $interfax->sendFile($number, $filePath, $fileType);
Usage with Laravel
If you are using Laravel, the package contains a Service Provider and a Facade for you.
- First you need to add the ServiceProvider and Facade classes in your
config\app.php
'providers' => [ ... Iivannov\Interfax\Support\InterFaxServiceProvider::class, ]; 'aliases' => [ ... 'Interfax' => Iivannov\Interfax\Support\Facade\InterFax::class ];
- Then you need to add your username and password in
config\services.php
'interfax' => [ 'username' => YOUR_INTERFAX_USERNAME, 'password' => YOUR_INTERFAX_PASSWORD ]
- You are ready to go, just use it like this
//send a text $message to the given $number Interfax::sendText($number, $message); //send a fax with file attachment to the given $number Iterfax::sendFile($number, $filePath, $fileType);