PHP 调用IE执行程序
程序员文章站
2022-03-30 18:40:45
...
/* 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教程有兴趣的朋友有所帮助。
下一篇: php正则表达式的介绍