Giter Site home page Giter Site logo

phpfaxto's Introduction

PHPFaxTo is a PHP class for easy use of the fax.to Fax API.

How to use

Set up

$fax = new FaxTo('<your api code here>');

Get account balance

echo $fax->getCashBalance(); // e.g. 3.7

Get fax cost

echo $fax->getFaxCost(<fax number>, <id of the document you want to send>); // e.g. 0.1

Get fax status

$status = $fax->getFaxStatus(<job id>); // associative array

Get fax history

$history = $fax->getFaxHistory(); // associative array

Send fax

Either document_id OR file must be set, not both.

$sent = sendFax($fax_number, $document_id = null, $tsi_number = null, $file = null, $delete_file = null); // associative array

Get files

$files = $fax->getFiles(); // associative array

Upload file

set is_remote to true if you need to supply a remote file path, e.g. http://domain.com/file.ext

$file = $fax->uploadFile(<file path>, $is_remote = false); // associative array

Delete file

$deleted = $fax->deleteFile(<file id>); // associative array

When sending a fax (and if it didn't fail immediately), status = executed and a fax_job_id will be returned. The fax_job_id will also be supplied in the callback in order to identify a fax sending process.

phpfaxto's People

Contributors

kaiserwerk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.