Posted by Justin Reynolds on January 19, 2009 at 13:17:34: Uploaded files: 1
In Reply to: Re: Comet as a Service posted by Robert G Laurin on January 19, 2009 at 11:04:28:
I don't use PHP often, so haven't tried this, but here's a tutorial on accessing COM objects from PHP:
http://www.phpbuilder.com/columns/alain20001003.php3
It all looks pretty similar to the way it worked in TCL.
Actually, I just took 5 minutes to play with it. This appears to work as a starter:
$lun = 1;
$comet = new COM("CometLib.CometFiles") or die("foo!");
$comet->Initialize("WokkaWokka");
$comet->Open($lun,"WWI1P","FIL");
$comet->BeginFile($lun);
$comet->InquireNext($lun);
print "record: '{$comet->GetRecField($lun, 0, 6)}'";
$comet->Terminate;
?>
(Not sure if the code is going to come through in the editor, so I'll attach it as well.)
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.