One of our client have an account with your interfax.net site having the username as “crackiswack” and want to integrate your Inbound as well as Outbound fax facility in our site debtsettlementnetwork.com that is built in PHP.
We got a sample code from your site to send fax which is as follows,
<? /** * Send a Fax using PHP/PEAR::SOAP Example: * - Using SendFaxEx() Method from InterFax Web Services */ /** * Your variables go here - assign a value to each one */ $username = "crackiswack"; $password = ""; // password I am not mentioning here $faxnumber = "+0018003100021"; // formatted like +13055551234, i.e. +(country code)(area code)(phone number) $file = "documents/doc10.doc"; // binary file to fax $filetype = "DOC"; //e.g. HTML, DOC, PDF, etc.; see documentation for complete list $postponetime = "2005-04-25T20:31:00-04:00"; //e.g. 2001-04-25T20:31:00-04:00, use a past date/time to fax immediately $resolution = "0"; // 0 for standard, 1 for fine $csid = ""; // your fax identifier, visible on the receiving machine's little screen $subject = "fax from Webintegrated"; // for your reference, visible in the outbound queue $replyemail = "mfc_viks@yahoo.co.in"; //optional address at which to receive an emailed confirmation /** * PEAR::SOAP class [http://pear.php.net/package/SOAP] */ require_once 'SOAP/Client.php'; // Open File if( !($fp = fopen($file, "r"))) { // Error opening file // Handle error how it is appropriate for your script exit; } // Read data from the file into $data $data = ""; while (!feof($fp)) $data .= fread($fp,1024); // URL path to InterFax Web Services $wsdl_url = 'http://ws.interfax.net/dfs.asmx?wsdl'; // Create an instance of the SOAP_WSDL class $WSDL = new SOAP_WSDL($wsdl_url); /** * This function creates a proxy to the SOAP services * so that you can access the InterFax methods directly * as if you were calling a local function */ $client = $WSDL->getProxy(); /** * Invoke the InterFax SendFaxEx Method * NOTE: 'base64_encode' is a native method in PHP [http://www.php.net/manual/en/function.base64-encode.php] */ $result = $client->SendFaxEx($username, $password, $faxnumber, base64_encode($data), $filetype, strlen($data), $postponetime, $resolution, $csid, $subject, $replyemail); // Echo Result if($result > 0) echo "Fax submitted. Transaction ID: $result"; else echo "Error sending fax. Return code: $result"; ?>
According to the above code, we need SOAP/client.php file. We have downloaded the complete SOAP package from the given URL (http://pear.php.net/package/SOAP) but this does not contain some files like PEAR.php, HTTP/Request.php etc. (for which it has shown us the errors while running it.)
Please let us know whether we are on right way or not?
Thanks
Developers
Web Integrated (India)

Thanks for ur reply.
But let me tell u that i am using apache 2.0 on windows 2000 professional for the develoment of the site.
So can u tell me what steps should i follow to install SOAP on my machine.
Currently, what i did, i created a folder in my apache's root directory with the name "test" and copid all the folders HTTP,NET,SOAP in it. Written the above code in test.php file. But while runnig it, getting errors of missing few files. This time the error is
Warning: main(Net/Socket.php): failed to open stream: No such file or directory in C:\Apache\Apache2\htdocs\AJ\HTTP\Request.php on line 47
Please help me out.
Thanks