Old 1st January 2005, 09:55   #1
systrum
Senior Member
 
systrum's Avatar
 
Join Date: Aug 2003
Posts: 134
scripting question

I'm limited in my scripting ability and hope someone may take an interest and help.

I am currently using php, and i'm able to display all my track info and link to a music label that supplies me with music.

viewable here ... the url will display between brackets as follows

artist - track [websiteURL]

but only when a track from that specific label is played

using this code ...

<div class="box_body">
<table class="box_content" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td class="track" id="current_track"><?php print str_replace("[www.URL.com]", "[<a href='http://www.URL.com'>LINK NAME</a>]", $song_title); ?></td>
<td class="time" id="now_playing">Now</td>
</tr>

<?php
while(list($key,$val) = each($con_song_print)) {
echo "<tr>\n";
$key = preg_replace( '/(http|ftp)+(s)?\/\/)((\w|\.)+)(\/)?(\S+)?/i', '<a href="\0">\4</a>', $key );
echo "<td class=track>";
echo str_replace("[www.URL.com]", "[<a href='http://www.URL.com'>LINK NAME</a>]", $con_song_print[$key]) . "</td>\n";
echo "<td class=time>$playtime[$key]</td>\n";
echo "</tr>\n";
}
?>

this was written for me a while back and i would like to add URL's from other labels also instead of just the one that is being displayed now.

would anybody be able to assist by demonstrating the code for how to add multiple label URL's?

Last edited by systrum; 1st January 2005 at 10:45.
systrum is offline   Reply With Quote
Old 2nd January 2005, 21:56   #2
ravetrax
Major Dude
 
ravetrax's Avatar
 
Join Date: Apr 2003
Location: Clearwater, FL ~~~~~~~~~~~~~~~ My name is Rava www.ravetrax.com
Posts: 541
Send a message via ICQ to ravetrax Send a message via AIM to ravetrax Send a message via Yahoo to ravetrax
you have access to mysql?

Echo34 - A music related irc network for the socially challenged. [ website | chat now ]

Stream Solutions - The next level of Shoutcast server hosting! [ website | forums ]

RaveTrax - Its not a state of mind, Its a way of life. [ website | forums | chatroom ]
» Gen2 A/V Streams - NSV Video [vp6.2 & 64k aacPlus v2] - 64k aacPlus v2 - 24k aacPlus v2
» AMPX Player - Web based player that plays ALL streams! [Audio & Audio/Video]
» Other Streams - 160k MP3 - 64k MP3 - 24k MP3
ravetrax is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

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