note 35960 added to class.com

From: Date: Sat, 20 Sep 2003 19:57:12 +0000
Subject: note 35960 added to class.com
Groups: php.notes 
Request: Send a blank email to php-notes+get-56820@lists.php.net to get a copy of this message
Here's an example/comparison of VBScript vs PHP's COM component to connect to an IIS Webserver. The examples backup the IIS MetaBase (your server's website(s) configuration) in IIS. VBScript: Dim obj, iFlags Set obj = GetObject("IIS://LocalHost") ' Backup to next available version number. ' Set flags to save the metabase first and ' force the backup even if save fails. iFlags = (MD_BACKUP_SAVE_FIRST or MD_BACKUP_FORCE_BACKUP) obj.Backup "MyBackups", MD_BACKUP_NEXT_VERSION, iFlags ' Note: The above was copied from Microbucks. ' This is how you would have to do it. ' i.e. use the actual constant's value. iFlags = (2 or 4) obj.Backup "MyBackups", &HFFFFFFFF, iFlags PHP: $obj = new COM("IIS://LocalHost")or die("Unable to instantiate IIS"); $err = com_invoke ($obj, "Backup", "MyBackups", "&HFFFFFFFF", 2|4 ); $obj = null; print "err=".$err; // returns 0 on success Glen ---- Manual Page -- http://www.php.net/manual/en/class.com.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35960 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35960&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35960&report=yes

« previous php.notes (#56820) next »