Perl Example Code
Overview
-
A very basic Perl code sample that will show how to send a fax to the Multitech Fax Finder device using Web Service API.
Prerequisites
- Download and Install Perl Active 5.10.0 at http://www.activestate.com/activeperl
- Download the Perl sample source code SendFax-Perl.zip here
Notes: The SendFax-Perl.zip contained two files:
- sendfax.pl
- schedule.xml
Modify schedule.xml
Load the schedule.xml file into your favorite editor, find the section below, and modify the fax number to point to your recipient fax number:
<recipient>
...
<fax_number>5138</fax_number>
</recipient>
Save it.
Modify sendfax.pl
Load up the sendfax.pl file into your favorite editor. Change the following.
Change the path to point to your Perl path.
#!/perl/bin/perl -wT
Change the user name and password.
$request->authorization_basic("admin","admin");
Change the IP address of the following line to point to your Fax Finder’s IP address.
my $request = HTTP::Request->new(POST => 'http://216.133.69.247/ffws/v1/ofax');
Save it. Go to command prompt and cd to the folder where it contained the sendfax.pl file and type:
perl -T sendfax.pl
Now, if you web into your FaxFinder device and go to Status & Log -> Fax Status, you should be able to see the Fax Finder is sending out a fax.