InterFax Integration: Submission as PDF to Fax Machine

  • Profile Image
    Asked on September 10, 2013 at 11:44 AM

    I'm trying to host PHP code from Interfax that will take the PDF of a form submiited and send it to a fax machine. Will you be able to explain to me how I will insert the code here to do this?





    /**************** Settings begin **************/ 

    $username          = '';  // Insert your InterFAX username here
    $password          = '';  // Insert your InterFAX password here
    $faxnumber         = '';  // Enter the destination fax number here, e.g. +497116589658
    $filename          = 'test.pdf'; // A file in your filesystem
    $filetype          = 'PDF'; // File format; supported types are listed at 

     /**************** Settings end ****************/

     // Open File
    if( !($fp = fopen($filename, "r"))){

        // Error opening file

        echo "Error opening file";




    // Read data from the file into $data

    $data = "";

    while (!feof($fp)) $data .= fread($fp,1024);




    $client = new SoapClient("");


    $params->Username  = $username;

    $params->Password  = $password;

    $params->FaxNumber = $faxnumber;

    $params->FileData  = $data;

    $params->FileType  = $filetype;


    $result = $client->Sendfax($params);

    echo $result->SendfaxResult; // returns the transactionID if successful

                                 // or a negative number if otherwise




  • Profile Image
    Answered on September 10, 2013 at 01:19 PM


    I've check InterFax and so to clarify, you would like that each of your form submission will be "SEND" over to a Fax Machine?

    I guess  you have the codes from: which is part of InterFax API. I think we need the help of our API team about so I'd like you to direct this inquiry to them. You can contact them through this form:

    Let me also add this to our feature request list. However, there is no definite timeframe as to when this get implemented or if there is any assurance that our developers will add this as part of our integration.