Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> simple html code??
trog
post Aug 24 2006, 01:09 PM
Post #1



*******

Group: Members
Posts: 4,933
Joined: 14-January 04
Member No.: 197



I want to create a random stream file. I dont want the person to click the button to link to just one audio file but a random audio file. So like if he were to click on it, it would play a different file each time he or she clicks the button.

Anyone know how this could be done. is there an html code or is it more of a javascript?
Go to the top of the page
 
+Quote Post
Google Bot
post Aug 24 2006, 01:09 PM
Post #


Google Ads









Go to the top of the page
 
Quote Post
Xeno
post Aug 24 2006, 01:29 PM
Post #2



*******

Group: Members
Posts: 2,238
Joined: 11-February 06
Member No.: 3,621



hmmm, ill look for the code for it, i think theres one

EDIT: Here ya go Trog, the page says a little, if ya still dont get it, Say and i should be able to help ya 2morro
http://www.irt.org/script/453.htm

This codes far from simple >.< lol

Oh ya, dont forget to change Autostart to FALSE, or else it'll start on its own
Go to the top of the page
 
+Quote Post
ThePredator
post Aug 24 2006, 02:00 PM
Post #3



*****

Group: Members
Posts: 1,720
Joined: 17-May 05
Member No.: 2,325



PHP would be much simpler.
Go to the top of the page
 
+Quote Post
Xeno
post Aug 24 2006, 11:46 PM
Post #4



*******

Group: Members
Posts: 2,238
Joined: 11-February 06
Member No.: 3,621



Dont you need a ftp server to do php though?
Go to the top of the page
 
+Quote Post
ThePredator
post Aug 25 2006, 01:17 PM
Post #5



*****

Group: Members
Posts: 1,720
Joined: 17-May 05
Member No.: 2,325



No, the web sever just has to be configured to use php, which they usually are.
Go to the top of the page
 
+Quote Post
trog
post Aug 30 2006, 05:31 PM
Post #6



*******

Group: Members
Posts: 4,933
Joined: 14-January 04
Member No.: 197



(Xeno;271583)
hmmm, ill look for the code for it, i think theres one

EDIT: Here ya go Trog, the page says a little, if ya still dont get it, Say and i should be able to help ya 2morro
http://www.irt.org/script/453.htm

This codes far from simple >.< lol

Oh ya, dont forget to change Autostart to FALSE, or else it'll start on its own


xeno.. tried substituting it for a mp3 file. It would only play file one over and over, and that script only works in IE not firefox.


as for PHP, I recall my webhost being a bit conservative of what they allow. I know peril and some other programs are not allowed for security reasons. or some lame reason. maybe because of their server type.

Im not a network guy, i just recall the webserver going into a big reason as to why could not use a peril or some script webpage.

anyways, Im gonna check out some other things. HTML is lame but flash requires plugins. Most new computers have them preinstalle but some people dont want to install it.
Go to the top of the page
 
+Quote Post
trog
post Aug 30 2006, 05:31 PM
Post #7



*******

Group: Members
Posts: 4,933
Joined: 14-January 04
Member No.: 197



(ThePredator;271591)
PHP would be much simpler.


can you show me how the code would go. I think I can get PHP to work since they let me use it to run a forum like this one.
Go to the top of the page
 
+Quote Post
ThePredator
post Aug 30 2006, 07:25 PM
Post #8



*****

Group: Members
Posts: 1,720
Joined: 17-May 05
Member No.: 2,325



I don't know how well this would work as I haven't used PHP in a long time but its worth a shot.


$song = array ("1", "2", "3", "4", "5"); /* replace the numbers with the urls to the songs*/

php?>

"
autostart="true"
type="audio/mpeg"
loop="true"/>
Go to the top of the page
 
+Quote Post
DaniellaMontoya
post Aug 31 2006, 12:39 AM
Post #9



*****

Group: Banned
Posts: 1,823
Joined: 7-June 06
Member No.: 4,440



Heh...
Pred is a real live coder -not just a 'script' guy.

Cool Beans!
Go to the top of the page
 
+Quote Post
Web Majick
post Aug 31 2006, 03:16 AM
Post #10



***

Group: Members
Posts: 623
Joined: 23-March 04
Member No.: 474



http://www.phon.ucl.ac.uk/home/mark/audio/randomplay.htm

You will need to preload all the file before the page loads or else you'll have the browser wait for all the files to download.

This seems like what you asked for, i think smile.gif
Go to the top of the page
 
+Quote Post
Web Majick
post Aug 31 2006, 03:18 AM
Post #11



***

Group: Members
Posts: 623
Joined: 23-March 04
Member No.: 474



the other option is ajax, once the button/link is clicked sends the request to the server just as Pred said, but then returns the embed tag back into the page without reloading it. This would probarbly be the best methid to use. smile.gif
Go to the top of the page
 
+Quote Post
trog
post Sep 2 2006, 01:35 AM
Post #12



*******

Group: Members
Posts: 4,933
Joined: 14-January 04
Member No.: 197



Ok, this is what I wanted to do. I wanted to create a radio show. But, I dont have the bandwith or security to run a live feed. I have used shoutcast and broadcast before, it took along time for me to figure out, but in the end, I was leaving my self open for a hacker.

So, I decided to create maybe 5 pre recorded radio shows. music, some comedy bits (dennis leary, Bill hicks, Bobcat.. etc). But, when people click on it, i dont want the same radio show to play from the start. I wanted to give it the impression it wasnt just one long audio stream.

I know it sounds corny, but no one wants to log off the site then log back on in an hour and have to start the show from the begining. At least this would give the person the impression it's a live show. And I would change the shows every couple of weeks with new music and formats.

Prep, I will try yours. Hopefully as mentioned above, I wont have to have my listeners preload the shows. I might even put some crazy UFO stuff on.
Go to the top of the page
 
+Quote Post
DaniellaMontoya
post Sep 2 2006, 02:00 AM
Post #13



*****

Group: Banned
Posts: 1,823
Joined: 7-June 06
Member No.: 4,440



Have you thought about Podcasts?

It's used for exactly what you are thinking of doing.
Like RSS feeds, without having to be too savvy.

You can do your own weekly show and stuff.

Here's a link..
Click Here
Go to the top of the page
 
+Quote Post
reallynobody
post Sep 2 2006, 02:20 AM
Post #14



*****

Group: Members
Posts: 1,106
Joined: 7-June 06
Member No.: 4,442



.
Go to the top of the page
 
+Quote Post
reallynobody
post Sep 2 2006, 02:22 AM
Post #15



*****

Group: Members
Posts: 1,106
Joined: 7-June 06
Member No.: 4,442



http://javascript.internet.com/
http://javascript.internet.com/miscellaneo...andom-midi.html
http://javascript.internet.com/miscellaneo...ows-script.html
Go to the top of the page
 
+Quote Post
Web Majick
post Sep 2 2006, 03:09 AM
Post #16



***

Group: Members
Posts: 623
Joined: 23-March 04
Member No.: 474



use a cookie to register each 'podcast' that way if a cookie is already present for a particular feed, it will not be selected again. You ill need to write a bit of code to do this, but it should be fairly easy to achieve. I would recomend using php http://www.php.net
Go to the top of the page
 
+Quote Post
trog
post Sep 2 2006, 04:35 PM
Post #17



*******

Group: Members
Posts: 4,933
Joined: 14-January 04
Member No.: 197



well, i purchased a web account so I have all the space and bandwith I need.
is there a fee for this site?

As for everyone else, Im gonna try the random code first. Thanks for the input, I'll try each persons advice if its easy enough. Im working on other things and dont feel like reading up on tutorials at this time.

I'll let you know when My site is up. You guys can test it out if you like smile.gif

(DaniellaMontoya;274026)
Have you thought about Podcasts?

It's used for exactly what you are thinking of doing.
Like RSS feeds, without having to be too savvy.

You can do your own weekly show and stuff.

Here's a link..
Click Here
Go to the top of the page
 
+Quote Post
ThePredator
post Sep 2 2006, 09:11 PM
Post #18



*****

Group: Members
Posts: 1,720
Joined: 17-May 05
Member No.: 2,325



I'm pretty sure you can rent dedicated shoutcast servers although it might get a little expensive. Usually though if you set up shoutcast dedicated on Linux and keep it updated it won;t get hacked.
Go to the top of the page
 
+Quote Post
trog
post Sep 4 2006, 11:50 PM
Post #19



*******

Group: Members
Posts: 4,933
Joined: 14-January 04
Member No.: 197



Yeah, they are. I checked out live365 and they charge 100 bucks a month for 500 hours of radio and the rates go up from there. so it's not a full month worth of radio. Not that I plan on being on my computer 24/7 but if Im not running an auto stream and shut it down a few hours a day, Anyone who likes my format might get discourage and go find another radio station to listen to. So, because I have a router and I have a laptop I dont use, I was thinking if I did stream live, I would use that laptop as a dedicated radio station. But again, Streaming live from cable is risky. so I just thought I would run a prerecorded station and just store it on my website. Not for downloading because that might be an issue.
Go to the top of the page
 
+Quote Post
ThePredator
post Sep 5 2006, 01:56 PM
Post #20



*****

Group: Members
Posts: 1,720
Joined: 17-May 05
Member No.: 2,325



If you run it prerecorded on your site people can download it unfortuanatly (just check the source and it shows you the file name).
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 5th December 2008 - 04:53 AM