Go Back   Winamp Forums > SHOUTcast > SHOUTcast Technical Support

Reply
Thread Tools Search this Thread Display Modes
Old 16th November 2004, 11:39   #1
Heini_net
Junior Member
 
Join Date: Nov 2004
Location: here
Posts: 49
sc_serv.rip refresh

hi.

i'm edit the sc_serv.rip with php but shoutcast don't read the file if a listener open the stream.. it works only, when i'm edit the sc_serv.rip at the web-interface.

how can i say shoutcast, that he should read the file again ?

for example a cgi command ? like "http://myserver : port/readripfile"

sorry for my bad english because i come from germany
Heini_net is offline   Reply With Quote
Old 16th November 2004, 13:04   #2
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens, NYC
Posts: 3,183
Send a message via AIM to djSpinnerCee
I think that the DNAS only re-loads the RIP file when you change it via the web interface, and when the DNAS loads.

If you want to initiate a re-read via CGI, just make and then undo a change to the RIP file [add a private-type IP address like 10.9.8.7] - make a note of the CGI sent to add, then remove an entry -- [hint: view source].
djSpinnerCee is offline   Reply With Quote
Old 16th November 2004, 13:37   #3
Heini_net
Junior Member
 
Join Date: Nov 2004
Location: here
Posts: 49
ya.. but this should refresh via php.. not manually.... so php send a command to shoutcast to re-read the file..
Heini_net is offline   Reply With Quote
Old 16th November 2004, 14:47   #4
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens, NYC
Posts: 3,183
Send a message via AIM to djSpinnerCee
Look at it this way, if you change the sc_serv config using whatever application while the DNAS is running, it will not look at it until the DNAS restarts -- The RIP file is similar except it will also be re-read when a change has been initiated by the web interface -- until then, just like the config file it is in memory and it is NOT read from disk whenever a listener connects.

Have the PHP send a www command to make the change directly via the DNAS HTTP interface. The DNAS knows nothing about PHP... There is no such command to "refresh" the list, you must use a DNAS operation [add/delete] on the RIP file, just "reading" it will not do, a change must be applied.

I'll add a little warning -- the file is supposed to be maintained by the DNAS only, so if you make a change "underneath" the DNAS [via the PHP script], and then you use the HTTP interface to make a change, the DNAS may just write the known [currently loaded] RIP table to disk without checking the disk-borne copy. So, it's probably a better idea [the only way?] to have the PHP send the HTTP commands to have the DNAS modify the table.
djSpinnerCee is offline   Reply With Quote
Old 16th November 2004, 15:00   #5
Heini_net
Junior Member
 
Join Date: Nov 2004
Location: here
Posts: 49
hm.. but it should work automatically without manual access

does not exist an other way to realize this ? because i will write a login-script..with a secure stream.. and after the listener have login.. the stream will be available..
Heini_net is offline   Reply With Quote
Old 16th November 2004, 15:58   #6
CraigF
Passionately Apathetic
Administrator
 
CraigF's Avatar
 
Join Date: May 2000
Location: Hell
Posts: 5,437
you can send a signal to it on unices, not sure what signal though. maybe sighup?

CraigF is offline   Reply With Quote
Old 17th November 2004, 12:05   #7
Heini_net
Junior Member
 
Join Date: Nov 2004
Location: here
Posts: 49
hm.. nobody know how to send a command or know an other way to connect (like API) to shoutcast ?
Heini_net is offline   Reply With Quote
Old 17th November 2004, 13:49   #8
paz21
Junior Member
 
Join Date: Feb 2004
Posts: 31
SIGWINCH reloads config, but not RIP file.
(SIGWINCH also breaks source link, it reconnects after 30 seconds though...)

host:port/admin.cgi?mode=ripip&ip1=111&ip2=222&ip3=333&ip4=444
will add 111.222.333.444 to RIP list .. but it requires basic auth. (host:port/admin.cgi?pass=PASS&mode=ripip&ip1=111&ip2=222&ip3=333&ip4=444 dont work)
paz21 is offline   Reply With Quote
Old 17th November 2004, 14:01   #9
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens, NYC
Posts: 3,183
Send a message via AIM to djSpinnerCee
Yeah -- I noticed that -- the HTML page's *FORM* uses a proprietary method [=url] -- so you will also have to be able to send the "HTTP METHOD" header so that the server will accept the PASS item in the url.
djSpinnerCee is offline   Reply With Quote
Old 18th November 2004, 19:55   #10
Heini_net
Junior Member
 
Join Date: Nov 2004
Location: here
Posts: 49
Hi Folks,

i have wrote a PortFilter that contain a IP list.. and it read the file, if a listener will connect to my port filter... so i mustn't use the shoutcast webinterface
Heini_net is offline   Reply With Quote
Reply
Go Back   Winamp Forums > SHOUTcast > SHOUTcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump