Jump to content

radio1017x

New Members
  • Posts

    4
  • Joined

  • Last visited

radio1017x's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Dude, thank you so much. I'm going to play around with this for a while and see if I can't just make it work.
  2. That was my original question, I thought so. And I know nothing about Ajax. Awesome. Is there a decent tutorial or something I can look at to start trying to figure that out? Or is it simple enough that someone might help me out with a sample of code?
  3. I actually had it set up pretty much exactly like that, but I'm using simplexml_load_file("nowplaying.xml") and it wasn't working, it turns out there was an error on my server that they are looking into right now to make that function work this is my php: <?php $xml=simplexml_load_file("nowplaying.xml") or die("Error: Cannot create object"); echo "Artist: {$xml->Artist}<br>"; echo "Title: {$xml->Title}<br>"; echo "Album: {$xml->Album}<br>"; echo "Length: {$xml->Duration}<br>"; echo "Label: {$xml->RecordLabel}<br>"; echo "Buy this song: <a href={$xml->Purchase}>{$xml->Artist} - {$xml->Title}</a>"; ?> But will this automatically refresh the information on the page when the xml file updates every few minutes? I don't want the listener to have to refresh the page to get the next song title, because that will stop the audio player.
  4. I am not a real deal programmer, I can make simple webpages that work, do some basic coding, but nothing more than html or simple php. If one of you fine folks could please help me, I am in need of a simple piece of code for my listen live page for my radio station's website. I have an on-air automation system that generates an xml file as each song plays, looks like this: <?xml version="1.0"?> <NowPlaying> <Current> <Station>KVXX</Station> <Artist>NOTHING BUT THIEVES</Artist> <Title>TRIP SWITCH</Title> <Album>NOTHING BUT THIEVES</Album> <Duration>03:00</Duration> <Category>Music</Category> <RecordLabel>RCA</RecordLabel> <Composer/> <CutNumber>11940</CutNumber> <StartTime>12/31/2015 11:29:22 AM</StartTime> <AlbumArt>http://radio1017x.com/imgs/nothingbuthieves-nothingbutthieves.jpg</AlbumArt> <Purchase>https://geo.itunes.apple.com/us/album/trip-switch/id1016210775?i=1016210784&at=1l3vnI8&mt=1&app=music</Purchase></Current></NowPlaying> So, basically all I need the piece of code to do is read certain lines from the XML when it updates and spit the text out on to the page automatically. Artist, Title, Album, Duration, and RecordLabel just need to be printed to the page as text, AlbumArt is a link to the current song's album art, which needs to load as well, and Purchase is a link to itunes for the listener to click on and go directly to buy the song, so that field is to be used as a link url. Is this simple to do? Do I need ajax for this or will normal php do?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.