views:

269

answers:

2

I am using PHP.

I need to send a fax of a particular file from my website. This needs to work for any number in the world. My searches so far have recommended using SOAP.

Is it not possible to send a fax like an email?

Is it not possible to send a fax without a paid service?

I have seen the below link, and it refers to the soapclient:

http://www.interfax.net/en/dev/webservice/samples/fax_php_sendcharfax_nusoa.html

The webservice is here:

http://ws.interfax.net/dfs.asmx?wsdl

How can I use this webservice in my code?

+2  A: 

It is possible to send and receive faxes via email. However, ultimately you will have to pay someone for the service. I don't know if the service you mentioned above provides these things.

What Languages and Tools? Any, that's the point of SOAP its a way of two programs talking/sending data to each other independent of what language they are written in. SOAP is actually just a particular name for

Simply follow the code from the website you provided....

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"];
cole
I just need of SoapClient Implementaion that u mentioned,
venkatachalam
soapclient is part of the nusoap library. You can download that at http://sourceforge.net/projects/nusoap/
Eric Petroelje
This is because of Eric
venkatachalam
A: 

It's not possible to send fax as email or send them without payment service since you need a gateway who provide transaction from data received from internet to telephone network.

What do you mean with "Develop the above soap client"? If you want to use it then the code provided in first link should be enough for example. If you don't want to use nusoap, then in pure php it should be something close to

$client = new SoapClient("http://ws.interfax.net/dfs.asmx?wsdl");
$params[] = array('Username'      => '********',
                'Password'        => '********',
                'FaxNumber'       => '+44-870-730-1444',
                'Data'            => 'My text goes here',
                'FileType'        => 'TXT'
                );

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

If you want to develop an Soap Server interface for providing this kind of service, i'd suggest to take a look to nusoap server.

Alekc