You are here: Fax API > Fax Web Service > Code Samples > PHP Samples > Deprecated Samples > PHP4: How to fax a character-based file, using NuSOAP
PHP Faxing Samples
- Tutorial: Fax from PHP
- Send a simple ASCII-text fax using SendCharFax
- Send one file attachment (e.g., PDF, DOC, HTML) to one recipient with Sendfax
- Fax one or more files to one or more recipients with SendfaxEx_2
- Get information about one or more submitted faxes with FaxStatusEx
- Get information about one or more submitted faxes with FaxQuery
- Get information about one or more submitted faxes with FaxQuery2
- Retrieve the image of a submitted fax with GetFaxImageResult
- Cancel a pending fax with CancelFax
- Inbound: get list of inbound faxes using GetList
- Inbound: retrieve a received fax using GetImageChunk
- Deprecated Samples
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"]; ?>