PHP code example of webmavens / laravel-faxage

1. Go to this page and download the library: Download webmavens/laravel-faxage 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/ */

    

webmavens / laravel-faxage example snippets


FAXAGE_USERNAME=YOUR_FAXAGE_USERNAME
FAXAGE_PASSWORD=YOUR_FAXAGE_PASSOWRD
FAXAGE_COMPANY_ID=YOUR_COMPANY_ID
FAXAGE_FAXNO=YOUR_FAXNO
FAXAGE_URL_NOTIFY=CALLBACK_URL
FAXAGE_TAG_NUMBER=YOUR_TAG_NUMBER (EX. 1.123.123.1234)

$laravelFaxage = new \Webmavens\LaravelFaxage\LaravelFaxage();
$params = [
            'recipname'    => 'test',
            'faxno'        => 8884732963,
            'faxfilenames' => 'fax.HTML',
            'faxfiledata'  => '<h1>Hello World</h1>',
            'operation'    => 'sendfax',
        ];
$response = $laravelFaxage->sendFax($params);

recipname = DESTINATION_NAME(32 characters max)
faxno = DESTINATION_NUMBER(10 digits, numeric only)
faxfilenames = FAX_FILE_NAME(Supported File Types: PDF, PS, DOC or DOCX, DOT, WPS, WPD, ODT, RTF, XLS or XLSX, PPT or PPTX, ODS, CSV, HTM, HTML, BMP, GIF, JPG, JPEG, TIF, TIFF, PNG, PCL, TXT)
faxfiledata = FAX_FILE_DATA(strings that are the contents/data of the file in faxfilenames)
operation = 'sendfax'

$laravelFaxage = new \Webmavens\LaravelFaxage\LaravelFaxage();
$params = [
            'recipname'    => 'test',
            'faxno'        => 8884732963,
            'faxfilenames' => 'fax.HTML',
            'faxfiledata'  => '<h1>Hello World</h1>',
            'operation'    => 'resend',
            'jobid'        => 1011792410,
        ];
$response = $laravelFaxage->sendFax($params);

recipname = DESTINATION_NAME
faxno = DESTINATION_NUMBER
faxfilenames = FAX_FILE_NAME
faxfiledata = FAX_FILE_DATA
operation = 'resend'
jobid = FAX_JOB_ID

$laravelFaxage = new \Webmavens\LaravelFaxage\LaravelFaxage();
$response = $laravelFaxage->listFax();

$laravelFaxage = new \Webmavens\LaravelFaxage\LaravelFaxage();
$faxId = FAX_ID(The numeric ID of the fax to get, retrieved from the listfax
operation (the recvid in listfax));
$response = $laravelFaxage->getFax($faxId);

$laravelFaxage = new \Webmavens\LaravelFaxage\LaravelFaxage();
$faxId = FAX_ID
$response = $laravelFaxage->notifyFaxage($faxId);