Hello! I'm having a problem with a COM script. Here is the script:

PHP Code:
$browser = new COM("InternetExplorer.Application");
$browser->Visible 1;
$browser->navigate("a web page");
while (
$browser->Busy) {
    
com_message_pump(4000);
}
$browser->document->all->SaveAs("test.html"); 
Is this correct? What i am trying to make a script that triggers a "Save Page As" function in a web browser. I tried everithing i could think of but still nothing. Please help.