| Home | Programs | Forum | Store | Entertainment | Articles | About us | ![]() |
![]() |

![]() |
![]() |
![]() |
![]() |
|||
Live Chat With Myghanaradio DJNews LinksDiaspora News .. Ghana Districts News.. Watch GTV News.. [ more ]
Support MyGhanaRadio Our sponsors
►
OWUSEK Productions
|
<%@ Language=VBScript %> <% ' Local file to store XML ' You must create a blank file named "local_424859.xml" in the same ' directory as this script. It MUST be writable by the web ' server. On unix you would CHMOD 666 the file. On Windows ' you will need to access your custom control panel to set ' the permissions or contact your hosting company. Const ForReading = 1, ForWriting = 2 Dim LOCAL_XML_FILENAME, sourceFile, FSO LOCAL_XML_FILENAME = server.MapPath("local_424859.xml") sourceFile = "http://www.text-link-ads.com/xml.php?inventory_key=HSRWTLAN5MTMB9M0T4R4&referer=" & Server.UrlEncode(Request.ServerVariables("HTTP_REFERER")) & "&user_agent=" & Server.UrlEncode(Request.ServerVariables("HTTP_USER_AGENT")) Set FSO = server.createObject("Scripting.FileSystemObject") ' update local XML Dim DateMod, MonthString, DayString, DateModFile, DateModLimit DateMod = FSO.getFile(LOCAL_XML_FILENAME).DateLastModified MonthString = Month(DateMod) If (MonthString < 10) Then MonthString = "0" & MonthString End If DayString = Day(DateMod) If (DayString < 10) Then DayString = "0" & DayString End If DateModFile = Year(DateMod) & "-" & MonthString & "-" & DayString & " " & Hour(DateMod) & ":" & Minute(DateMod) & ":" & Second(DateMod) MonthString = Month(Date) If (MonthString < 10) Then MonthString = "0" & MonthString End If DayString = Day(Date) If (DayString < 10) Then DayString = "0" & DayString End If DateModLimit = Year(Date) & "-" & MonthString & "-" & DayString & " " & (Hour(Now)-1) & ":" & Minute(Now) & ":" & Second(Now) Dim Contents, Result, xmlhttp, TextStream ' read local XML Contents = "" Set TextStream = FSO.OpenTextFile(LOCAL_XML_FILENAME, ForReading, False, -1) Do While Not TextStream.AtEndOfStream Contents = Contents & TextStream.ReadLine Loop TextStream.Close Set TextStream = nothing If (DateModFile < DateModLimit Or FSO.getFile(LOCAL_XML_FILENAME).size < 20) Then ' fetch remote XML Set xmlhttp = CreateObject("Microsoft.XMLHTTP") xmlhttp.open "GET", sourceFile, False xmlhttp.send "" Result = xmlhttp.responseText If (Result <> "") Then Contents = Result End If ' write new XML to local file Set TextStream = FSO.OpenTextFile(LOCAL_XML_FILENAME, ForWriting, True,-1) TextStream.Write Contents TextStream.Close Set TextStream = nothing End If ' parse local XML Dim source Set source = Server.CreateObject("Microsoft.XMLDOM") source.async = false source.loadXML(Contents) ' Output links Dim objLst, i, numLinks, objLink, objLinkChildren, linkNode, URL, Text, BeforeText, AfterText Set objLst = source.getElementsByTagName("Link") numLinks = objLst.length If numLinks > 0 Then Response.Write("
Myghanaradio is now on Facebook!
Advertisements
MyGhanaRadio now Playing Live on iPhone
To listen : Click on the "App Store" button on your iPhone and install a free app called "FStream."
On "FStream" click "Favorites" then "Preset." Select "Africa" and you're set to go! Multitask on your iPhone while listening to Myghanaradio.
DONATE. Your support will keep us on the AIR
This site accepts payments through Paypal. No account required. Paypal is free and secure.
![]() |
|| Programs || Forum || Music store || Featured articles || Entertainment || Music News || News Links || About us
Copyright © Myghanamusic Web 2006-2010. All Rights Reserved.