free!
artık yok...
ShoutCast Radyolar için panelden veri çekip düzenleyip sayfanızda yayınlayaiblirsiniz..
Biraz önce bir müşterim için yazdığım kod.. XMLHTTP hakkında bilgiler çok az olduğu için yayınlamak istedim...
kodları herhangi bir ad ile kaydedin,
http://radyo5.alyasoft.net:8782/ olan yeri değiştirip kendi radyo sunucunuzun panel adresini yazın, ve kullanın.
Sorun olursa paylaşın çözelim
PHP:
<%
Function fonkVeriCek(strVeri, strBaslamaEtiket, strBitisEtiket)
dim intBaslama
intBaslama = InStr(1, strVeri, strBaslamaEtiket, vbTextCompare)
if intBaslama then
intBaslama = intBaslama + Len(strBaslamaEtiket)
intBitis = InStr(intBaslama + 1, strVeri, strBitisEtiket, vbTextCompare)
fonkVeriCek = CStr(Mid(strVeri, intBaslama, intBitis - intBaslama))
else
fonkVeriCek = " "
end if
End Function
function fonkXmlHttp(strUrl)
dim objXmlHttp
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.Open "GET", strUrl, false
objXmlHttp.SetRequestHeader "Pragma", "no-cache"
objXmlHttp.SetRequestHeader "Cache-control", "no-cache"
on error Resume next
objXmlHttp.Send
if Err.Number<>0 then
fonkXmlHttp = ""
exit function
end If
on error Goto 0
if (objXmlHttp.Status = 200) then
fonkXmlHttp = objXmlHttp.ResponseText
fonkXmlHttp = fonkStream(objXmlHttp.ResponseBody,"iso-8859-9")
else
fonkXmlHttp = "Hata : " & objXmlHttp.StatusText
end if
end function
function fonkStream(Veri,KarakterSet)
dim objStream
set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Mode = 3
objStream.Open
objStream.Write Veri
objStream.Position = 0
objStream.Type = 2
objStream.Charset = KarakterSet
fonkStream = objStream.ReadText
objStream.Close
set objStream = Nothing
end function
veri = fonkXmlHttp("http://radyo5.alyasoft.net:8782/")
veri = Replace(veri, "%", "x")
veri = Replace(veri, "<HTML><HEAD><meta http-equiv=""Content-Language"" content=""en-us""><meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1252""><meta http-equiv=""Pragma"" content=""no-cache""><meta http-equiv=""Expires"" content=""Mon, 01 Jan 1990 12:00:00 GMT""><title>SHOUTcast Administrator</title><style type=""text/css""><!--a:link {color: blue; font-family:Arial, Helvetica; font-size:9pt;}a:visited {color: blue; font-family:Arial, Helvetica; font-size:9pt;}a:hover {color: red; font-family:Arial, Helvetica; font-size:9pt; }.default {color: White; font-family:Arial, Helvetica; font-size:9pt; font-weight: normal}.ST {color: White; font-family:Arial, Helvetica; font-size:8pt; font-weight: normal}.logoText {color: red; font-family: Arial Black, Helvetica, sans-serif; font-size: 25pt; font-weight: normal; letter-spacing : -2.5px;}.flagText {color: blue; font-family: webdings; font-size: 36pt; font-weight: normal; }.ltv {color: blue; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal;}.tnl {color: black; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; text-decoration: none;}--></style></HEAD><BODY topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor=#000000 text=#EEEEEE link=#001155 vlink=#001155 alink=#FF0000><font class=default><table width=100x border=0 cellpadding=0 cellspacing=0><tr><td height=50><font class=flagText>U</font><font class=logoText> SHOUTcast D.N.A.S. Status</font></td></tr><tr><td height=14 align=right><font class=ltv><a id=ltv href=""http://www.shoutcast.com/"">SHOUTcast Server Version 1.9.7/Linux</a></font></td></tr><tr><td bgcolor=#DDDDDD height=20 align=center><table width=100x border=0 cellpadding=0 cellspacing=0><tr><td align=center><font class=tnl><a id=tnl href=""index.html"">Status</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href=""played.html"">Song History</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href=""listen.pls"">Listen</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href=""home.html"">Stream URL</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href=""admin.cgi"">Admin Login</a></font></td></tr></table></td></tr></table><br><table cellpadding=5 cellspacing=0 border=0 width=100x><tr><td bgcolor=#000025 colspan=2 align=center><font class=ST>Current Stream Information</font></td></tr></table>", "<style>.default{font-family:verdana; font-size: 7pt;}</style>")
veri = Replace(veri, "<br><table cellpadding=0 cellspacing=0 border=0 width=100x> <tr><td bgcolor=#DDDDDD nowrap colspan=5 align=center><table cellspacing=0 cellpadding=0 border=0><tr><td><font class=ltv>Written by Stephen 'Tag Loomis, Tom Pepper and Justin Frankel</font></td></tr></table></td></tr><tr><td nowrap colspan=5 align=center><font class=ST><b><a href=""http://www.shoutcast.com/disclaimer.phtml"">Copyright Nullsoft Inc</a><a href=""/llamacookie"">.</a> 1998-2004</b></font></td></tr></table></font></body></html>", "")
veri = Replace(veri, "Server is currently up and public.", "Radyo su an yayinda!")
veri = Replace(veri, "Stream is up at", "Yayin kalitesi")
veri = Replace(veri, "with", "<br>Toplam dinleyici")
veri = Replace(veri, "of", "<br>Toplam kapasite")
veri = Replace(veri, "listeners", "dinleyici.")
veri = Replace(veri, " unique", "")
veri = Replace(veri, "Server Status", "Radyo durumu")
veri = Replace(veri, "Stream Status", "Yayin durumu")
veri = Replace(veri, "Listener Peak", "Dinleyici")
veri = Replace(veri, "Average Listen Time", "Dinlenme süresi")
veri = Replace(veri, "Stream Title", "Yayin adi")
veri = Replace(veri, "Content Type", "Icerik")
veri = Replace(veri, "Stream Genre", "Tür")
veri = Replace(veri, "Stream URL", "Adres")
veri = Replace(veri, "Stream ICQ", "ICQ")
veri = Replace(veri, "Stream AIM", "AIM")
veri = Replace(veri, "Stream IRC", "IRC")
veri = Replace(veri, "Current Song", "Calan Sarki")
veri = Replace(veri, "align=center", "align=left")
response.write veri
%>
Biraz önce bir müşterim için yazdığım kod.. XMLHTTP hakkında bilgiler çok az olduğu için yayınlamak istedim...
kodları herhangi bir ad ile kaydedin,
http://radyo5.alyasoft.net:8782/ olan yeri değiştirip kendi radyo sunucunuzun panel adresini yazın, ve kullanın.
Sorun olursa paylaşın çözelim