[prev in list] [next in list] [prev in thread] [next in thread]
List: php-gtk-general
Subject: [PHP-GTK] Calling IE for a form POST?
From: Benjamin Smith <bens () effortlessis ! com>
Date: 2004-11-04 0:46:00
Message-ID: 200411031646.00269.bens () effortlessis ! com
[Download RAW message or body]
Has anybody here used IE/COM to do a form POST?
It's trivial to use GET, just use
<?
$obj=
$obj->Navigate($url_including_url_params);
?>
But, what if you need to hide particular values so it's not in the browser
history? (login/pw?)
I need to do it this way, through the browser, because I am, in effect,
logging in the user's browser to prompt them to do something. I've tried
calling the "Default browser" with various incantations of exec() and
backticks, but it's dog-slow.
Here's the closest I got, and it doesn't work:
<?
// AN ABORTIVE ATTEMPT TO USE FORM POST...
$a=array(
'a',
'=',
'5',
);
foreach($a as $k => $td)
{
$key=$k+1;
$pass[$key]=ord($td);
}
$browser = new COM("InternetExplorer.Application");
$browser->Visible = true;
$browser->Navigate(
"http://chico.benjamindsmith.com/show.php",
null,
null,
$pass,
"Content-Type: application/x-www-form-urlencoded\r\n");
return false;
?>
Has anybody successfully done stuff like this?
-Ben
--
"I kept looking around for somebody to solve the problem.
Then I realized I am somebody"
-Anonymous
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic