<?php
/* 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( $allforms as $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执行程序
最新推荐文章于 2024-05-15 14:06:39 发布