![]() |
#1 |
Senior Member
|
Remote Kicksource function
I would like to implement a kicksource function in a dll I am making, yet I can't seem to find the correct data to send the dnas. you hit the server at ip:port/admin.cgi?pass=password&mode=kicksrc
You have to send headers to it. so I sent the request: "GET /admin.cgi?pass=password&mode=kicksrc HTTP/1.1\nUser-Agent:WEBcast Media Mozilla\nHost: ip\nConnection: Close\n\n" I received Error 403 Forbidden, I realize however if I type the url in my browser it brings up the login box but kicks the source anyway... Yet after checking the server after the forbidden message it failed to kick the source. Any insight on what I need to send the server to kick source.. Or maybe a library to specify login name/password? Thanks ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
![]() ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#3 |
Alumni
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
|
Looks okay. Are you using the correct DNAS password?
For PHP, use: code: Just change whatever fopen and fputs translates to your dll calls. ***************************** This is not a Technical Support Ondemand forum. Sometimes questions may not get answered right away. Please exercise patience and understanding. |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
That is not working, I am still getting Error 403 Forbidden.
I am specifying the right password because I am manually setting it, not variable. I am using the new SC dnas 1.9.2. Any help on this would be great. ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#5 |
Forum Loser
(Forum King) |
try these changes...
PHP Code:
|
![]() |
![]() |
![]() |
#6 |
Senior Member
|
What is the difference exactly? They look exactly the same and my IP and port are fine, I'm not using php I'm using C++, but I am sending those headers. The headers you just posted look 100% the same as the above post.
~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#7 |
Alumni
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
|
Are you using \n (original post) or \r\n pairs (replies)?
Have you tried a direct http connection? http://admin:password@ip:port/admin.cgi?mode=kicksrc |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
Well fester your direct connect worked well when I put it in my browser... however how do you have a tutorial site on how to send the username:pass via C++ winsock? Thanks
~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#9 |
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
dont know whether this is what your wanting or not. but you can make an html file which has the refresh header linked to the kick source url. this will essentially (when the page is left open) kick the source continuously depending on the refresh rate you specify. i did this myself one day when my dj's auto broadcast went awol when he was off. i just had the html file kick his source continuously.
|
![]() |
![]() |
![]() |
#10 |
Forum Loser
(Forum King) |
Its PHP, Not C++ so some of the code more than likely won't convert.
|
![]() |
![]() |
![]() |
#11 |
Senior Member
|
Heh, I'd rather do the source kick through my dll. Thanks for the input though.
~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#12 |
Moderator Alumni
Join Date: May 2000
Location: Next Door
Posts: 8,942
|
Error 403 Forbidden is not an error you should recieve from SHOUTcast
Are you sure you are connecting to shoutcast, could you paste the entire error, headers and all? -Jay | Radio Toolbox.com |
![]() |
![]() |
![]() |
#13 |
Senior Member
|
Sure here they are:
strcpy(HitBuffer,"GET /admin.cgi?pass=mypassword&mode=kicksrc HTTP/1.0\nUser-Agent: Mozilla\nConnection: Close\n\n"); Error is: 403 forbidden. You don't have permission to access /admin.cgi on this server. ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#14 |
Moderator Alumni
Join Date: May 2000
Location: Next Door
Posts: 8,942
|
yup, that's not shoutcast, I am not sure what to tell you but whatever it is that you are connecting to, it's not a SHOUTcast server.
Maybe if you had the headers that came with that error as well we could pinpoint exactly what it is you are connecting to. Also post the ip and port that you are using in your plugin. BTW just to give you a little insight, the only error code returned by SHOUTcast would be: code: or code: typically when trying to do what you are doing. -Jay | Radio Toolbox.com |
![]() |
![]() |
![]() |
#15 |
Forum Loser
(Forum King) |
Jay, Sounds more like a header from a HTTP Server if you ask me.
|
![]() |
![]() |
![]() |
#16 |
Senior Member
|
It is a HTTP Server but I am not authorized. I will try out another method A.S.A.P been a bit busy hopfully get to it tommorow.
Thanks for the feedback though. ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#17 |
Senior Member
|
Ok I just converted my socket http requests to wininet requests. maybe I'm doing something wrong looking into the ports. I am receiving a reply from the server verifying the dnas and version. However my request for /admin.cgi and even /index.html both failed telling me the resource requested was not found. My question here is are there any headers I "have" to send to the server? Perhaps I need to send it some specific headers.
Thanks, ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#18 |
Moderator Alumni
Join Date: May 2000
Location: Next Door
Posts: 8,942
|
you have to send "Mozilla" in a user-agent header, that's all. Turn on your www log in SHOUTcast and use that to see what all you are hitting and what User-Agent with.
-Jay | Radio Toolbox.com |
![]() |
![]() |
![]() |
#19 |
Senior Member
|
Thanks for that but I'm unsure...
Ok from using IE I get a log for: [http:150.101.113.184] REQ:"/" (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)) And through the dll I get: [dest: 150.101.113.184] Invalid resource request(/index.html) <11/15/03@18:27:20> [dest: 150.101.113.184] Invalid resource request(/index.html) I'm looking at it and it doesn't make sense to me. one says http: and one is dest: ~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#20 |
Senior Member
|
Scratch that, it's all working now thanks for everyones help, it was the User-Agent. Unfortunetely I didn't read the documentation well enough and so I was adding two User-Agents :|
~Rothgar Dawgclan Network Genre: Rap/Hip-Hop http://www.dawgclan.net |
![]() |
![]() |
![]() |
#21 |
Junior Member
Join Date: Apr 2004
Posts: 2
|
Sorry but I can run this script... You can help me?
Example my server is rx.pl:1234 admin pass: 223344 i create: <?php $fp = fopen("rx.pl", "1234"); if ($fp) { fputs("GET /admin.cgi?pass=223344&mode=kicksrc HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n"); fclose($fp); } ?> Dont work... I dont undestand PHP but I think my correction on script is good. Why dont work? Please Help me! |
![]() |
![]() |
![]() |
#22 |
Junior Member
Join Date: May 2002
Location: Stavanger, Norway
Posts: 25
|
Well, this solution isn't working. Especially not with 1.9.2. All I get when I type the url manually in that script, I get the login-box to login. And the script itself produces this error: http://www.nordicradio.no/kickdj.php
http://pastebin.com/330546 <- my fields. Try it, and you will get the same error: Warning: fopen(158.37.36.102): failed to open stream: Success in /home/nordic/public_html/kickdj.php on line 6 I hope you will attempt to fix this error. Webmaster for Radio 3 Norway |
![]() |
![]() |
![]() |
#23 |
Moderator
Join Date: Nov 2004
Location: Streamsolutions Headquarters
Posts: 11,953
|
check out the open msn link in my sig as that will kick source to the server amongst other things,
it may give you a simple solution to what you are doing ![]() |
![]() |
![]() |
![]() |
#24 |
Moderator Alumni
Join Date: May 2000
Location: Next Door
Posts: 8,942
|
the reason you see the login box is because after a kicksrc the server redirects you back to the admin page.
With php I recommend using fsockopen over fopen as you have more control over the headers which as said before MUST represent a Mozilla agent. -Jay | Radio Toolbox.com |
![]() |
![]() |
![]() |
#25 |
Junior Member
Join Date: Sep 2004
Posts: 6
|
Hello, I was searching on how to kick the source of the shoutcast server remotely (through php), and came across this forum. I haven't written the php file yet, but I was trying to do it with a link:
http://admin:password@radio.amnt.net...i?mode=kicksrc And I get: Invalid syntax error The page cannot be displayed The page you are looking for might have been removed or had its name changed. Believe me, I know the subdomain works.. Any ideas why I may be getting this? Andrew |
![]() |
![]() |
![]() |
#26 |
Junior Member
Join Date: Nov 2006
Posts: 7
|
I too am having problems writing a dll (for use with mirc) to kick the source.
Can you paste the section of code you used? I have no problems downloading the xml stats using URLDownloadToFile, but cannot find the correct syntax to access the admin.cgi?mode=kicksrc, or admin.cgi?mode=resetxml links. I'm using the wininet API as opposed to winsock. If anyone has any ideas on how to code this in C/C++ using windows API functions please let me know. |
![]() |
![]() |
![]() |
#27 |
Junior Member
Join Date: Jun 2014
Posts: 2
|
I have a script for mirc to kick the source if anyone needs Email ferrellhodges@yahoo.com
and ALSO I have a script I put in pal that works with sams broadcaster Just start up sams and it kicks the source and start a encoder all in one script works with sams broadcast contact if anyone is interested Last edited by NufSaid; 24th June 2014 at 18:06. Reason: fixing |
![]() |
![]() |
![]() |
#28 |
Junior Member
Join Date: Jun 2014
Posts: 2
|
I have a script for mirc to kick the source if anyone needs Email ferrellhodges@yahoo.com
and ALSO I have a script I put in pal that works with sams broadcaster Just start up sams and it kicks the source and start a encoder all in one script works with sams broadcast contact if anyone is interested -------------------------------------------------------------------------------- |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|