shoutcast 1.9.8

Pagina: 1
Acties:
  • 85.703 views

Acties:
  • 0 Henk 'm!

  • foxoffire33
  • Registratie: November 2011
  • Laatst online: 03-03 05:27
hallo ik heb een schoutcast server.
ik wel infomatie door sturen naar een php script maar dat werkt niet.
ik moet een instelling aan pasen in de config van shoutcast maar weet niet wat.
ik hoop dat iemand mij kan helpen .

groeten foxoffire33

php scripts
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<body bgcolor="#000000"><?php 

function getcontent($server, $port, $file) 
{ 
   $cont = ""; 
   $ip = gethostbyname($server); 
   $fp = fsockopen($ip, $port); 
   if (!$fp) 
   { 
       return "0"; 
   } 
   else 
   { 
       $com = "GET $file HTTP/1.0\r\nAccept: */*\r\nAccept-Language: de-ch\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 5.0)\r\nHost: $server:$port\r\nConnection: Keep-Alive\r\n\r\n"; 
       fputs($fp, $com); 
       while (!feof($fp)) 
       { 
           $cont .= fread($fp, 500); 
       } 
       fclose($fp); 
       $cont = substr($cont, strpos($cont, "\r\n\r\n") + 4); 
       return $cont; 
   } 
} 
include ("config_radio.php"); 
$basecontent = getcontent($scip, $scport, "/7.html"); 
$pieces = explode(",", $basecontent); 
// Check if someone is currently broadcasting on the server 
if ($pieces[1] == "0") 
{ 
$status = "Momenteel Offline of een storing sorry voor het ongemak"; 
} 
elseif ($pieces[1] == "1") 
{ 
$status = "<font face='Verdana' color='#23CB12'><b>Online!</font>"; 
} 
else 
{ 
$status = "<font face='Verdana' color='#3FB513'><b>Helaas </b>op dit moment niet, Bezig met onderhoud of er is een storing."; 
} 
//Als er geen snelheid is gevonden legt hij er een 0 
if ($pieces[5] == "") 
{ 
$pieces[5]= "0"; 
} 
{ 
$pieces[3]= "200"; 
} 
//Als het liedje dat afspeelde niet gevonden kon worden dan legt hij het woord, Geen 
if ($pieces[6] == "") 
{ 
$pieces[6]= "Geen"; 
} 
//Als er enkele gegevens niet kloppen, dan poept hij de errors eruit 
if ($pieces[3] == "") 
{ 
$uitleg= "<b>Server is Off-line.</b>"; 
} 
//Als de radio uit is, moeten de gegevens niet meer getoond worden 
//hier wordt het aantal luisteraars geleegt 
if ($status == "Nee Helaas!") 
{ 
$pieces[0]= "0"; 
} 
//Hier wordt de balk liedje geleegt 
if ($status == "Nee") 
{ 
$pieces[6]= "Geen"; 
} 
//uiteindelijk wordt de snelheid op 0 gezet 
if ($status == "Nee") 
{ 
$pieces[5]= "0"; 
} 
?>
<html> 
<head> 
<SCRIPT LANGUAGE=JAVASCRIPT> 
<!-- hide 
function go() 


    { 
    window.location.href="parse.php" 
} 

--> 
</SCRIPT>
<script>

function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
<SCRIPT language=JavaScript>
<!--
<!--

//Disable right mouse click Script
//By BK
//Dit is een code zonder poppup!!!

var message="Function Disabled!";

///////////////////////////////////

function clickIE4(){
if (event.button==2){

return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){

return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false")

// -->

function MM_popupMsg(msg) { //v1.0
  alert;
}
//-->
</SCRIPT>
<table border="1" bordercolor=#0099FF width="100%" id="table1">
<tr><td align="center" width="100%" height="85" bgcolor="#000000" bordercolordark="#0099FF" bordercolor="#0099FF" bordercolorlight="#0099FF">
    <b><marquee onmouseover = 'this.stop()' onmouseout = 'this.start()' width = '100%' scrollamount = '2' style="color: #FFFFFF; font-size: 11px; font-family: Verdana,Tahoma,Arial,Helvetica" bgcolor="#0099FF" behavior="alternate" height="15">* * * * * * * * * * * U Hoor    <img src='progressbar_microsoft1.gif' width='30' height='6'>  nu Bij Het <img src='progressbar_microsoft1.gif' width='30' height='6'>  de-blije-piraten* * * * * * * * * * </marquee></b>
<link rel="stylesheet" href="http://www.de-blije-piraten.nl.nl/radio/stylebox.css" type="text/css" />
</head><body bgcolor="#000000">

<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"><p></p><p></p>
<table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0"> 

    <tr> 
    <td><b><font face="Verdana" color="#FF0000">Server-status     :</td> 
    <td><? echo $status; ?></td> 
  </tr>  
  </tr>
    <tr> 
    <td><b><font face='Verdana' color='#FF0000'>Nu Speelt     :</td> 
    <td><? echo $pieces[6]; ?></td> 
  </tr> 
    <tr> 
    <td><b><font face='Verdana' color='#FF0000'>Snelheid   :</td> 
    <td><? echo $pieces[5]; ?> kbps</td> 
  </tr> 
    <tr> 
    <td><? echo $uitleg; ?></td> 
  </tr>
     </td>
</table>
</center><br><body bgcolor="#000000"><font face="Verdana" color="#FFFFFF" size="1px"> 
      Over   <b id="countDownText"></b>&nbsp;&nbsp;seconden word dit scherm vernieuwd.
    </font><script language="JavaScript"> 
      var countDownInterval = 30; 
      var countDownTime = countDownInterval + 1; 

      if (document.all||document.getElementById) 
        countDown(); 
      else 
        window.onload = countDown; 

      function countDown() { 
        countDownTime--; 
        if (countDownTime == 0) { 
          countDownTime = countDownInterval; 
          window.location.reload(); 
          return; 
        } 
        else if (countDownTime < 0) 
          countDownTime = 30; 
        if (document.all) 
          document.all.countDownText.innerText = secsToMins(countDownTime); 
        else if (document.getElementById) 
          document.getElementById("countDownText").innerHTML = secsToMins(countDownTime); 
        counter = setTimeout("countDown()", 1000); 
      } 

      function secsToMins(theValue) { 
        var theMin = Math.floor(theValue / 60); 
        var theSec = (theValue % 60); 
        if (theSec < 10) 
          theSec = "0" + theSec; 
        return(theMin + ":" + theSec); 
      } 
    </script></body></html>


code:
1
2
3
4
5
6
<?php 
// Configuratie 
$scip = "http://deblijepiraten.nl"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port) 
$scport = "8010";                   // port of shoutcast server 
//End configuration 
?><body bgcolor="#000000">


shoutcast
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
; SHOUTcast Distributed Network Audio Server configuration file
; Copyright (C) 1998-2004 Nullsoft, Inc.
; All Rights Reserved.
; Last modified Mar 17 2004

; If you want to manage multiple configurations, just copy
; this file to another name, and run sc_serv with that name
; such as:
; sc_serv.exe sc_leet.conf

; ***************************
; Required stuff
; ***************************

; MaxUser.  The maximum number of simultaneous listeners allowed.
; Compute a reasonable value for your available upstream bandwidth (i.e. if
; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
; choose 256kbps/24kbps=10 maximum listeners.)  Setting this value higher
; only wastes RAM and screws up your broadcast when more people connect
; than you can support.
MaxUser=150

; Password.  While SHOUTcast never asks a listener for a password, a 
; password is required to broadcast through the server, and to perform
; administration via the web interface to this server.  This server should
; consist of only letters and numbers, and is the same server your broadcaster
; will need to enter in the SHOUTcast Source Plug-in for Winamp.  THIS VALUE
; CANNOT BE BLANK.
Password=hidden

; PortBase. This is the IP port number your server will run on.  The
; value, and the value + 1 must be available.  If you get a fatal error when
; the DNAS is setting up a socket on startup, make sure nothing else on the
; machine is running on the same port (telnet localhost portnumber -- if you
; get connection refused then you're clear to use that port).  Ports < 1024 
; may require root privledges on *nix machines.  The default port is 8000.
PortBase=8010

; ***************************
; Optional Parameters
; ***************************

; ***************************
; Logging configuration
; ***************************

; LogFile: file to use for logging. Can be '/dev/null' or 'none'
; or empty to turn off logging. The default is ./sc_serv.log
; on *nix systems or sc_serv_dir\sc_serv.log on win32.
; Note: on win32 systems if no path is specified the location is
; in the same dir as the executable, on *nix systems it is in the
; current directory.
LogFile=sc_serv.log

; RealTime displays a status line that is updated every second
; with the latest information on the current stream (*nix and win32 
; console systems only)
RealTime=1

; ScreenLog controls whether logging is printed to the screen or not
; on *nix and win32 console systems. It is useful to disable this when 
; running servers in background without their own terminals. Default is 1
ScreenLog=1

; ShowLastSongs specifies how many songs to list in the /played.html
; page.  The default is 10.  Acceptable entries are 1 to 20.
ShowLastSongs=10

; TchLog decides whether or not the DNAS logfile should track yp 
; directory touches.  Adds and removes still appear regardless of
; this setting.
; Default is yes
; TchLog=yes

; WebLog decides whether or not hits to http:// on this DNAS will
; be logged.  Most people leave this off because the DSP plug-in
; uses http:// calls to update titles and get the listener count,
; which takes up a lot of log space eventually.  If you want to
; see people making hits on your admin.cgi or index pages, turn
; this back on.  Note that this setting does NOT affect XML stats
; counters for hits to http:// pages.
; Default is no.
; WebLog=no

; W3CEnable turns on W3C Logging.  W3C logs contain httpd-like accounts
; of every track played for every listener, including byte counts those listeners
; took.  This data can be parsed with tools like Analog and WebTrends, or given
; to third parties like Arbitron and Measurecast for their reporting systems.
; Default is Yes (enabled).
W3CEnable=Yes

; W3CLog describes the name of the logfile for W3C logging.  Default logfile is
; sc_w3c.log, in the same directory wherever the DNAS gets started from.
W3CLog=sc_w3c.log


; ***************************
; Network configuration
; ***************************

; SrcIP, the interface to listen for source connections on (or to make relay 
; connections on if relaying). Can and usually will be ANY or 127.0.0.1  
; (Making it 127.0.0.1 will keep other machines from being able to
; broadcast using your shoutcast server )
SrcIP=ANY

; DestIP, IP to listen for clients on (and to contact yp.shoutcast.com)
; can and usually will be be ANY. If your machine has multiple IP addresses,
; set this to the one you want it to be accessed by.
DestIP=ANY

; Yport, port to connect to yp.shoutcast.com on. For people behind caching 
; webproxies, change this to the alternate port (666 is what it might be, 
; check www.shoutcast.com if you have problems). Otherwise, leave this at 80.
; We're actively working on re-opening port 666, but as of release the only
; working port is port 80.
Yport=80

; NameLookups.  Specify 1 to perform reverse DNS on connections.
; This option may increase the time it takes to connect to your
; server if your DNS server is slow.  Default is 0 (off). 
NameLookups=1

; RelayPort and RelayServer specify that you want to be a relay server.
; Relay servers act as clients to another server, and rebroadcast.
; Set RelayPort to 0, RelayServer to empty, or just leave these commented
; out to disable relay mode.
 RelayPort=0
 RelayServer=185.10.51.58

; ***************************
; Server configuration
; ***************************

; AdminPassword.  This password (if specified) changes the
; behavior of Password to be a broadcast-only password, and
; limits HTTP administration tasks to the password specified
; here.  The broadcaster, with the password above, can still
; log in and view connected users, but only the AdminPassword
; will grant the right to kick, ban, and specify reserve hosts.
; The default is undefined (Password allows control for both 
; source and admin)
 AdminPassword=**********

; AutoDumpUsers controls whether listeners are disconnected if the source
; stream disconnects. The default is 0.
AutoDumpUsers=0

; AutoDumpSourceTime specifies how long, in seconds, the source stream is
; allowed to be idle before the server disconnects it. 0 will let the source
; stream idle indefinately before disconnecting. The default is 30.
AutoDumpSourceTime=30

; ContentDir specifies the directory location on disk of where to stream
; on-demand content from.  Subdirectories are supported as of DNAS 1.8.2.
; Default is ./content, meaning a directory named content in the same directory
; as where sc_serv was invoked from.
; ContentDir=./content

; IntroFile can specify a mp3 file that will be streamed to listeners right
; when they connect before they hear the live stream.
; Note that the intro file MUST be the same samplerate/channels as the 
; live stream in order for this to work properly. Although bitrate CAN
; vary, you can use '%d' to specify the bitrate in the filename
; (i.e. C:\intro%d.mp3 would be C:\intro64.mp3 if you are casting at 64kbps).
; The default is no IntroFile
; IntroFile=c:\intro%d.mp3

; BackupFile can specify a mp3 file that will be streamed to listeners over
; and over again when the source stream disconnects. AutoDumpUsers must be
; 0 to use this feature. When the source stream reconnects, the listeners
; are rejoined into the live broadcast.
; Note that the backup file MUST be the same samplerate/channels as the 
; live stream in order for this to work properly. Although bitrate CAN
; vary, you can use '%d' to specify the bitrate in the filename
; (i.e. C:\backup%d.mp3 would be C:\backup32.mp3 if you are casting at 32kbps).
; The default is no BackupFile
; BackupFile=C:\intro%d.mp3

; TitleFormat specifies a format string for what title is sent to the listener.
; For example, a string of 'Justin Radio' forces the title 'Justin Radio' even
; when the source changes the title. You can use up to one '%s' in the string
; which lets you contain the title from the source. For example, if your 
; TitleFormat is 'Justin Radio: %s', and the source plug-in's title is 
; 'Billy plays the blues', then the net title is 
; 'Justin Radio: Billy plays the blues'. Note: only works on non-relay servers.
; The default is no format string. 
; TitleFormat=Justin Radio: %s

; URLFormat specifies a format string for what url is sent to the listener.
; Behaves like TitleFormat (see above).
; The default is no format string.
; URLFormat=http://www.server.com/redirect.cgi?url=%s

; PublicServer can be always, never, or default (the default, heh)
; Any setting other than default will override the public status
; of the source plug-in or of a SHOUTcast server that is being relayed.
PublicServer=default

; AllowRelay determines whether or not other SHOUTcast servers will be
; permitted to relay this server.  The default is Yes.
AllowRelay=Yes

; AllowPublicRelay, when set to No, will tell any relaying servers not
; to list the server in the SHOUTcast directory (non-public), provided
; the relaying server's Public flag is set to default.  The default is
; Yes.
AllowPublicRelay=Yes

; MetaInterval specifies how often, in bytes, metadata sent.
; You should really leave this at the default of 8192, but the option is 
; provided anyway.
MetaInterval=8192

; *****************************
; Access Control
; *****************************

; ListenerTimer is a value in minutes of maximum permitted time for
; a connected listener.  If someone is connected for longer than this
; amount of time, in minutes, they are disconnected.  When undefined,
; there is no limit defined.  Default is undefined.
; ListenerTimer=600

; BanFile is the text file sc_serv reads and writes to/from
; for the list of clients prohibited to connect to this
; server.  It's automatically generated via the web
; interface.
; BanFile=sc_serv.ban

; RipFile is the text file sc_serv reads and writes to/from
; for the list of client IPs which are *ALWAYS* permitted
; to connect to this server (useful for relay servers).
; This file is automatically generated via the web
; interface.  Note that if your server is FULL, and someone
; from a Reserved IP connects, the DNAS will force the person
; listening for the longest time off to make room for the new
; connection.
; RipFile=sc_serv.rip

; RIPOnly, when set to Yes, will only allow IP addresses listed in the Reserved
; IP list to connect and relay.  All other connections for listening will be denied.
; This is really only useful for servers whose sole purpose is to provide the
; primary feed to all public relays.  Setting this value to Yes also forces the
; server into Private mode, since listing this server in the directory would
; be pointless.  Default is No.
; RIPOnly=No

; *****************************
; Extended Logging 
; *****************************

; The old features previously at this location, HistoryLog and CurrentLog, are
; no longer used and succeded by W3C Logging and XML, respectively.

; ***************************
; Mass Configuration
; ***************************

; Unique: assigns a variable name for use in any config item which points to a
; file.  Useful for servers running lots of SHOUTcast servers that have similar
; configuration parameters, excepting logfile names, banfile names, etc.  Any
; parameter that takes a pathname can include the character $, which will
; substitute $ for the variable assigned here.  Keep in mind that the unique
; variable can only be used after it is defined, so don't try to use a unique
; variable substitution in a path before you define it.  For example, you 
; could set:
; Unique=my_server
; and then define Log=/usr/local/shoutcast/$.log in an included configuration 
; file.  Default is Unique=$, so that by default any file with $ in the name 
; won't substitute anything at all.

; Include: instructs the sc_serv to read from the named configuration file,
; *at the point of insertion of the Include statement*, and process as though
; the included file was part of itself.  Note that all configuration parameters
; in the DNAS config file are processed first to last, so if an item is defined
; twice in a configuration, the last item to process will be the one that takes
; effect.  For this reason, it's usually a good idea to use the Includes first
; in a config file.
; example:
; Include=/usr/local/shoutcast/common.conf
; Default is not applicable.

; *****************************
; Tweaks
; *****************************
;
; DON'T MESS WITH THIS STUFF UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
; DON'T COMPLAIN TO US IF YOU MESS WITH IT AND THINGS BREAK.
; HAVE A NICE DAY.

; CpuCount is used to explicitly limit the DNAS to dominating a finite
; amount of processors in multiprocessor systems.  By default, 
; SHOUTcast creates one thread for every processor it detects in the
; host system, and assigns listeners equally across all the threads.
; In the event SHOUTcast doesn't correctly determine the number of
; CPUs in your host, or if you for whatever reason want to force
; the DNAS to not use other processors, you can say so here.
; Default behavior is to use as many processors as the DNAS detects on
; your system.
; CpuCount=1

; Sleep defines the granularity of the client threads for sending data.
; DNAS 1.7.0, per client thread, will send up to 1,024 bytes of data
; per socket (or less depending on the window available), and then
; sleep for the provided duration before repeating the whole process.
; Note that making this value smaller will vastly increase CPU usage on 
; your machine.  Increasing reduces CPU, but increasing this value too far 
; will cause skips.  The value which seems most optimal for 128kbps 
; streaming is 833 (833 microseconds per client poll) on our test labs.
; We wouldn't recommend setting it any lower than 100, or any higher than 
; 1,024.  If you have a slower machine, set this number lower to fix
; skips.
; Default value is 833.
; Sleep=833

; CleanXML strips some whitespace and linefeeds from XML output which
; confuses some (poorly written) XML parsers.  If you get XML rendering errors,
; try turning this on.  Default is No (off).
; CleanXML=No
;
; TAG RULES


PS: ik weet niet of dit het juste topic is zo niet kan een moderator hem dan in de goede zetten

[ Voor 68% gewijzigd door foxoffire33 op 21-03-2013 22:52 ]


Acties:
  • 0 Henk 'm!

  • Equator
  • Registratie: April 2001
  • Laatst online: 18:18

Equator

Crew Council

#whisky #barista

Welkom op GoT *O*

Helaas is je eerste topic meteen een topic wat niet door de beugel kan -O-
Het topic staat niet op de juiste plaats. Je hebt je topic nu geplaatst in Professional Networking & Servers wat bedoelt is voor geavanceerde problemen ron Servers en Netwerken. Een PHP probleem heeft daar niets te zoeken.

Probleem is echter dat - zelfs al verplaats ik het topic naar Programming - je topic alsnog gesloten gaat worden omdat het simpelweg niet voldoet aan de voorwaarden.
Je geeft niet aan wat je zelf al geprobeerd hebt
Je geeft niet aan waarop je al gezocht hebt en wat je gevonden hebt
Je geeft niet aan waarom deze oplossingen niet de oplossing waren voor jouw specifieke probleem.
Je post niet alleen de relevante code, maar meteen je volledige config.

We zijn geen helpdesk waar je een antwoord kan krijgen.. We verwachten inzet van de gebruikers. Momenteel zie ik dat bij jou nog niet terug komen.

Ik zet een slot op het topic. Als je je aan de regels houdt raad ik je aan om te gaan kijken in Programming en wellicht daar een topic te starten. Houdt je dan wel aan de regels in Programming Beleid

[ Voor 6% gewijzigd door Equator op 22-03-2013 07:19 ]


Dit topic is gesloten.