Request

Discussion about IRCBot, it's plugins, etc.
Post Reply
Author
Message
nwgator
Offline
Junior Member
Posts: 15
Joined: Mon Nov 08, 2010 5:00 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Debian
Location: FL
Contact:

Request

Post by nwgator »

Just wondering, is there a way to forward requests from a website form (ie. input box) to the bot, to PM the DJ and/or announce in the channel?

I've been wanting to do this for a while and I don't know where to begin.

Thanks,

Nolan

Indy
User avatar
Offline
Site Admin
Posts: 465
Joined: Thu Oct 16, 2008 1:58 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Contact:

Re: Request

Post by Indy »

Yes, you can use the WebReqest system and pass the request to request.php.
Or you can do it directly via PHP sockets to the bot (see the function RequestSong in the WebRequest Sytem include/functions.inc.php for an example).
You can also contact me via email or instant messenger, links are at the bottom of this post.

nwgator
Offline
Junior Member
Posts: 15
Joined: Mon Nov 08, 2010 5:00 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Debian
Location: FL
Contact:

Re: Request

Post by nwgator »

Where's the webrequest at?

And how would I go about passing the request to it?

Indy
User avatar
Offline
Site Admin
Posts: 465
Joined: Thu Oct 16, 2008 1:58 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Contact:

Re: Request

Post by Indy »

It's on the same download page where you got the bot. Assuming you install WebRequest, you just pass the request like this: request.php?fn=Your%20Requested%20Song
You can also contact me via email or instant messenger, links are at the bottom of this post.

nwgator
Offline
Junior Member
Posts: 15
Joined: Mon Nov 08, 2010 5:00 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Debian
Location: FL
Contact:

Re: Request

Post by nwgator »

Sorry to reply to this really old post.

I just now set up the webrequest system and I'm not sure on how to set up PHP sockets to send requests to it. I looked at the function, and it was kind of hard to understand.
Also, I'd like the requests from the system to message the radio channel if there is no DJ logged into the request system, and PM the DJ if it is.

Pretty much, I want the request.php page to be always available. if I go to request.php in my web browser it says "Invalid ID, or no ID passed!" However, when I'm logged into the system and go to request.php?fn=Your%20Requested%20Song and type a song, it will Send me a PM.

Is this possible?

Thanks!

Indy
User avatar
Offline
Site Admin
Posts: 465
Joined: Thu Oct 16, 2008 1:58 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Contact:

Re: Request

Post by Indy »

Currently the bot can only take requests when a source plugin (AutoDJ, SAM, etc.) or Live DJ are signed in, but not a fallback channel or anything for when there is no source or DJ. It may be able to be added though; if it's something you really want you can post a Feature Request.

request.php has to have a parameter, it's not a standalone page. You could easily make a PHP or HTML page though with a form text box that would post to the request.php script (using the fn variable).

For example:

Code: Select all

<form action="request.php" method="post">
<input name="fn" value="Your Request Here">
<input type="submit" value="Submit Request">
</form>
You can also optionally include a "dedication" field that will be sent along with the request to the DJ.
You can also contact me via email or instant messenger, links are at the bottom of this post.

Post Reply