robot script that logs me in and fills forms automatically
Can someone please tell me how to make a script in php or maybe any other lang. that can log me into any website and fill up a form.
Please post any links or whatever solution that anyone might be having. The form is in .aspx format. Like suppose I have to submit question to LQ so I will login using this php script and fill up the form Such a script is what I am looking for. |
Quote:
I recommend writing it in java. I made once such a program. You just have to analyze the traffic that is being send and received from the webserver. After that you can open a socket and generate these packets yourself. |
I did this in C recently.
The site used the HTTP post method for logging in and used cookies for user/password authentication. I did what the gent above said. I used a packet sniffer to see what was going on and then emulated it in my code. |
Can someone please throw somelight on as to how should I analyze this traffic. And also how to handle the cookies and other session data
Thank you. |
RE: robot script that logs me in and fills forms automatically
Perl has routines to do stuff like that in the WWW::Mechanize module
|
I dont know too much about perl.
Can you help me with this WWW::Mechanize module |
I dont know perl. Can you help me with WWW::Mechanize module
|
If you don't know Perl, you might struggle a bit ;-), or of course you can learn it....
It's a very good lang... anyway, here's a short example to get you started Code:
#!/usr/bin/perl -w |
RE: robot script that logs me in and fills forms automatically
I find that http://search.cpan.org is very helpful with function documentation of the modules. The page is here for WWW:Mechanize.
For perl syntax I found this site good (even though it is for windows) And here is the perl.net.au wiki tutorial That should give you a reasonably good background to it all And of course I am glad to help you where I can (I am still learning Perl as well :study: ) |
OK, Thank you very much. I will try this but can someone tell me something about curl which you find in php
Thanks |
|
All times are GMT -5. The time now is 07:31 AM. |