NameSilo

Random You Tube Video Script

NamecheapNamecheap
Watch

pixelbugnyc

Established Member
Impact
4
I have a spot on my blog where I post you tube videos I find interesting each day. It would be great if there was a way to randomly play you tube videos from a list of you tube links i manage. Does anyone have a script that can do this? Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
Anyone?
 
0
•••
The easiest way would be to put the youtube video IDs in a database or an array and pull them randomly from there.
 
0
•••
Tree is probably right. I could possibly write you a script for a couple of bucks if you wanted me to.

-RageD
 
0
•••
Since they're in your blog already, a script could be written to comb the blog database searching for anything that looks like a youtube link.
 
0
•••
PHP:
<?php
$videos = array();
$videos[] = 'abcdefghijk';
$videos[] = 'dajidjadas';
/* etc */

$vid = array_rand($videos);
?>
Code:
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/<?php echo $vid; ?>"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<?php echo $vid; ?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
 
0
•••
pixelbugnyc said:
I have a spot on my blog where I post you tube videos I find interesting each day. It would be great if there was a way to randomly play you tube videos from a list of you tube links i manage. Does anyone have a script that can do this? Thanks.
u mean have them posted up randomly as blog entries?
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back