Navigate($f1_url);sleep(5);/* $allforms is NOT">
时间:2021-07-01 10:21:17 帮助过:4人阅读
/* just copied six lines below ... */$Browser = new COM('InternetExplorer.Application');
$Browserhandle = $Browser->HWND;
$Browser->Visible = true;
$f1_url = "http://**.com/def.php";
$Browser->Navigate($f1_url);
sleep(5);
/* $allforms is NOT an array ... it is an iterator ... */$allforms = $Browser->Document->getElementsByTagName( 'form' );
/* current() is not implemented ... so we have to run a loop ... */foreach( $allformsas$theform ) {
/* i also copied these six lines and did some text replace work ... */$theform->id->focus();
$theform->id->value = "username";
$theform->pwd->focus();
$theform->pwd->value = "password";
$theform->action->focus();
$theform->action->click();
}
/* bye browser ... have a nice day ... */$Browser->Quit();
以上就介绍了 PHP 调用IE执行程序,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。