PHP4: How to fax a character-based file, using NuSOAP
25 Nov 2016 This code sample is deprecated and in process of being removed. Check out our new code libraries and usage documentation on InterFAX @ Github.
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("https://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"];
?>