note 35960 modified in class.com by vrana

From: Date: Thu, 05 Aug 2004 18:11:24 +0000
Subject: note 35960 modified in class.com by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74038@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: <?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 --was-- 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 http://php.net/manual/en/class.com.php

« previous php.notes (#74038) next »