Page 1 of 1

Request

Posted: Tue Nov 09, 2010 5:08 pm
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

Re: Request

Posted: Tue Nov 09, 2010 5:49 pm
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).

Re: Request

Posted: Tue Nov 09, 2010 10:36 pm
by nwgator
Where's the webrequest at?

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

Re: Request

Posted: Tue Nov 09, 2010 10:56 pm
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

Re: Request

Posted: Sat Jul 30, 2011 12:11 am
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!

Re: Request

Posted: Sat Jul 30, 2011 12:23 am
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.