User Control Panel
Advertisements

HELP US, HELP YOU!

submit information via a form

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
zander
God Like
God Like


Joined: 14 Jan 2004
Posts: 540
Location: england
Reputation: 66.6

PostPosted: Wed Dec 13, 2006 2:14 pm    Post subject: submit information via a form Reply with quote

Ok im not a newbie as im quite active on here however im not the greatest coder so im asking if anyone can help me with a simple command

my idea is for something along these lines....

the user types: !request

bot reply: type the song title and artist

user:
song title - artist, the user hits enter and then the bot does the following

goes to this page - http://www.music4live.net/requests.php

it would paste the information into the box... the name would be simple " Chatbot" and the message would be the song and artist



could someone please do this for me? or even get me started on it? i will leave any type of copyright on it if that be a simple message below the command or whatever it will be done.

Thanks in return, Zander Very Happy
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Wed Dec 13, 2006 11:14 pm    Post subject: Reply with quote

You can work out the actual bot stuff, but to post a form:

Code:

use LWP::UserAgent;
my $ua = LWP::UserAgent->new();
$response = $ua->post('http://www.music4live.net/staff/dj.php',[
'habbo' => 'Josh', # This is the name field
'type' => '2', # This is the "Entry Type. 1 = Request. 2 = Shout Out. 3 = Report a DJ. 4 = Competition Entry
'msg' => 'This is my message.', # Message field
'time' => '18:11 PM, EST', # It seems to be 5 hours behind GMT. Generate it yourself.
'Submit' => 'Send!!']);

print $response->content; # Shows the resulting page, which should be "Thanks for sending in your shoutout/request Josh!"


Hope this helps Smile.

_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
zander
God Like
God Like


Joined: 14 Jan 2004
Posts: 540
Location: england
Reputation: 66.6

PostPosted: Thu Dec 14, 2006 1:07 pm    Post subject: Reply with quote

yea cheer mate helped alot!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group