Click to See Complete Forum and Search --> : A quick perl question: LWP


Trogdor
02-07-2004, 07:22 PM
I am using LWP in perl to fill in forms. I have part of a script written, and I need to know how to post submit data.

The website I am using this script on is indecline.net (http://www.indecline.net/index.php) . Here is the code I am wondering about:POST 'http://www.indecline.net/index.php',
Content_Type => 'form-data',
Content => [ user => 'my_username',
passwd=>'my_password',
submit=>#What to put here to submit the above data?
]

I'm very very new to lwp, and to perl (but I know php, c++, etc), so there are probably many errors. I'm just trying to submit data through a post form.

Thanks.

Trogdor
02-08-2004, 12:14 AM
bump

bwkaz
02-08-2004, 03:34 PM
Do you have to put anything? I haven't looked at the HTTP POST command much, but the "submit" form element is just a button that tells the browser to POST the contents of the form when it's clicked. The button doesn't really have a value. You might be able to just leave it out.

Trogdor
02-08-2004, 07:13 PM
Then how do I tell LWP to "hit the submit button"?

bwkaz
02-09-2004, 11:20 PM
You don't, I don't think. When you hit the submit button in a "normal" browser, that's when the browser does the POST operation. I would guess that the fact you're telling LWP to POST to that URL means that that part of it is handled already.

But I've never used LWP, either. I'm just guessing. :)