PHP4: How to fax a character-based file, using NuSOAP

Faxing a character-based file, such as HTML or text with PHP4 using NuSOUP

Here's a snippet that shows how to fax a character-based file, such as HTML or text. NuSOAP is a one-file download and has no dependencies, making it simpler to install than PEAR::SOAP.

<?php
 
require_once('nusoap.php');
$client = new soapclient("http://ws.interfax.net/dfs.asmx?wsdl", true);
$params[] = array('Username'      => '********',
                'Password'        => '********',
                'FaxNumber'       => '+44-870-730-1444',
                'Data'            => 'My text goes here',
                'FileType'        => 'TXT'
                );
 
$result = $client->call("SendCharFax", $params);
 
echo $result["SendCharFaxResult"];
 
?>