David T-G wrote:
Justin, et al --
...and then Justin Patrin said...
% % You can use PEAR's HTTP_Client package % (http://pear.php.net/package/HTTP_Client) to connect to a website, do % authentication, post forms, handle redirects, etc. It also keeps track % of cookies.
Oh, goodie; that sounds great.
% % Here's a sample (note that the URLs in this will probably not work):
% % require_once('HTTP/Client.php');
% $client = &new HTTP_Client(array('user' => 'username', 'password' => % 'password'));
That certainly seems easy enough.
% $code = $client->post('http://www.example.com/script.asp', % array('var1' = 'val1', % 'VAR2' => 'val2'));
OK, so I don't actually need to navigate the page but instead just fill in the fields and then send it. Very cool.
% $code = $client->get('http://www.example.com/loginRequired.php');
Now to figure out how to try it out :-)
Thanks & HAND
:-D
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php