Re: PHP script that fills forms ?
| From: | Bogdan Stancescu | Date: | Wed, 26 Nov 2003 11:25:17 +0000 |
| Subject: | Re: PHP script that fills forms ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171027@lists.php.net to get a copy of this message | ||
Check out curl, I think it does this. If it doesn't, you have one last shot to keep it simple by sending the data via GET instead of POST. If that fails too, you're practically going to have to emulate a browser. That wouldn't be SO tricky, sending a few POST variables is not *such* a big deal. But you're also going to have to take care of the cookies that site sends you for authentication, and so on (send it back with each page).
I'm not sure this is actually worth the trouble -- you could try checking out Lynx and wget. While wget knows about HTTP authentication, I don't think you can make it understand the cookies stuff. Maybe with some smart automation you could somehow make lynx du what you're after.
HTH
Bogdan
Anonymous wrote:
I was just wondering if it's possible to get a PHP script to fill a form for you? You see, I'm trying to make PHP fetch a password protected website for me and there's a form with username and password that protects it. Can anyone help me? Perhaps give me another sollution?