RE: Re: Automated Login

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use fsockopen() to build the HTTP header you are sending to a
web site in order to mimic a post form submission.

Ken

-----Original Message-----
From: Jason Barnett [mailto:jasbarne@xxxxxxxxxxx] 
Sent: April 28, 2004 3:25 PM
To: php-windows@xxxxxxxxxxxxx
Subject:  Re: Automated Login


Ron Herhuth wrote:

> I am trying to build an automated dashboard sort of thing that goes 
> and checks if several of my clients sites are functioning and 
> reporting back the findings.
> 
> I have two types of URLs that I'm attmepting to check.
> 
> 1) Typical static URLs example: http://www.yahoo.com
> 
> 2) I would like to have the app attempt to login by sending the Login 
> handling page the username and password as POST data.  This seems like

> it would be easy if it were a GET form but it is a POST form.

Some POST forms can actually be passed information in the query string, 
as if it was using the GET method.  I use this bookmark to test it:

javascript:(function(){var x,i; x = document.forms; for (i = 0; i < 
x.length; ++i) x[i].method=%22get%22; alert(%22Changed %22 + x.length + 
%22 forms to use the GET method.  After submitting a form from this 
page, you should be able to bookmark the result.%22); })();

Thanks to Jesse Ruderman's website for this very handy bookmark!

> 
> How can I hit the pages and report back if the site is working and the

> page loaded, and in the case of the login pages, if I was able to have

> the script successfully login?
> 
> Thanks,
> Ron

The cURL extension is probably going to help you with this.
http://www.php.net/curl

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux