Jump to content

Recommended Posts

Posted

I need some help, it seems I'm getting over my head here. I am trying to develop a script, preferably javascript, to change the target of a hyperlink on two hour intervals. The big picture is that I am in the process of making several m3u files so I can psuedo stream audio content from my webpage. My idea is to set these up in an array and have them randomly picked every two hours so it wouls appear to be a true streaming. The next step would be to reactivate the hyperlink to the m3uy file so that someone listening for a time would not have to restart their media player to get the next m3u file. I been tinkering with some javascript but can only figure out the randomly picked target and I think I can get the timer part woking but putting ir all together seems daunting to me.

 

Thank you for any help

Subdeacon William

Posted

Just like lawyers do in preparation for a case, the secret to good coding is not knowing everything, but knowing where to look to get the pieces you need and then putting them together in new ways:

 

ht*p://www.boutell.com/newfaq/creating/songmenu.html

 

plus

 

ht*p://www.sean.co.uk/a/webdesign/javascriptdelay.shtm

 

 

Should get you on the right track.

Posted

You'd probably be better of using a PHP script as Javascript is dependant on a lot of variables at the users end. Just make the link point to the PHP script and make the PHP script then forward them to the correct M3U file.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...