![]() |
Forum Bot
Hey bros, I really would like to make a forum bot like this one http://www.vereor.com/forum/viewforum.php?f=11 where I can teach it to answer repetitive questions that get asked all the time as well as have a conversation with people.
I figured I would start with something simple... like a bot that posts the daily world news, or sports scores... something like that... Is this possible with Perl or would I have to use this AIML one http://alice.sunlitsurf.com to interact with my site and do what I need? Also, do you have any idea how to get started? Well, since my first bot won't be interactive (until I get a brain for it) it doesn't have to monitor the forums for new messages... just post to them at a timed interval. So I guess it's a simple matter of calling an HTML page (or PHP in the case with my forums) and getting the bot to fill out forms. Sounds pretty simple to me, but I don't know where to start... |
I'm just learning Perl. To be more clear and concise --
Is there is a special module I have to install to be able to talk to my website and fill forms? What command do I need to fetch a page? ?Would it be like: my $form = get("http://www.mydomain.com/forums/index.php?act=Post&CODE=00&f=1"); What command do I need to fill out and send a form? Do I even need to get the page or can I just have it fill out the form and send it? |
LWP module. Beautiful module that let's you interact with the web (forms included).
Once installed, perldoc LWP for details. If this is your first time using LWP, do something even simpler like just fetching a webpage (2 liner), and then work up from there. WG |
use HTML::FillInForm
see www.cpan.org for details, it rox for form filling ... Hmmm wonder where i use that for :Graucho |
Thank you sooo much buddies! Programming is sooo FUN! :)
:thumbsup |
Quote:
WG |
Quote:
|
Quote:
Perl is a love/hate relationship. When it doesn't work, your baffled, when it does, its sweet. Enjoy. WG |
this is what I have so far...
Code:
#!/usr/local/bin/perl I think it's filling out the form... I can't really tell from my DOS prompt on my local machine and it gives me 500 on the server... Help Please? |
If you're going to be doing anything complex over the web, you'll want to learn LWP and IO::Socket. Hang out at http://www.perlmonks.org - they're very helpful over there. And get yourself a copy of "Perl Core Language Little Black Book".
Good luck, SpaceAce |
Oh, yeah, and check this out for a neat example of databasing/knowledge collection:
http://www.smalltime.com/dictator.html SpaceAce |
Thanks for the links SpaceAce! :)
|
All times are GMT -7. The time now is 10:53 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123