Connecting Tech Pros Worldwide Forums | Help | Site Map

faxing from php

Ward Germonpé
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi,

I use W2K/IIS5/PHP432.
COM is enabled, and works for excel/word exports.
Now I'd like to be able to fax from my application.

The PHP code below doesn't issue warnings, but the modem remains silent.
The equivalent code in VB however does send faxes all right.

Any thoughts ? In the dcomcnfg menu there a list of potential comservers
like word/excel, but no mentioning of the faxservice.


thx

Ward


<?php
$FS= new COM("FaxServer.FaxServer") or die ("no fax");
$filename="D:/temp/testfax.doc";
$FD = $FS->CreateDocument($filename);
$FS->Connect("dispatch-svr");
$FS->Retries=1;
$FS->RetryDelay=1;
$FD->FaxNumber="021234567";
$FD->Send;
$FS->Disconnect;
?>


Public Sub fax()
Dim FS As New FaxServer
Dim FD As New FaxDoc
Dim FileName As String

FileName = "d:\temp\testfax.doc"
Set FD = FS.CreateDocument(FileName)
FS.Connect ("dispatch-svr")
FS.Retries = 1
FS.RetryDelay = 1
FD.FaxNumber = "021234567"
FD.Send
FS.Disconnect
End Sub

Closed Thread


Similar PHP bytes