Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attention PHP Coding Gurus
#1
If you are familiar with PHP, I desperately need your HELP
( I am willing to pay a reasonable fee for this coding assistance. )

I have a lot of Youtube videos that I want to embed on a website, but want to stay away from creating individual pages for each individual video.

I want to create a "generic" page that would display the videos.

A PHP script would load the generic video page

The PHP script would also send the video title and youtube ID to a embedded youtube player located on the generic video page.

This PHP script would be activated by clicking on a html link - on another page.

Example:

"http://www.mydomain.com/music.php?song_title,youtube_id"

Each link would have a different song title / youtube id number - to correspond to the specific youtube video.

The song title would be displayed above the embedded youtube player and the youtube id number would be placed in the embedded player to allow video playback.

If you have any questions - please contact me Smile

Thanks every one !
Reply
#2
Maybe you can make a youtube playlist and then call that playlist via:

https://developers.google.com/youtube/iframe_api_reference#Retrieving_playlist_information
Reply
#3
I do not want a playlist.

I want to show each video individually on seperate pages, as previously stated.
Reply
#4
(2013-11-13, 11:51:56)saint Wrote: "http://www.mydomain.com/music.php?song_title,youtube_id"

That would be dangerous - anyone could create a link to display any youtube video with any title in your site.

I'd rather use only one id parameter and have a list of id's and titles stored in an array, file or something, and only allow those.
Reply
#5
saint Wrote:I have a lot of Youtube videos that I want to embed on a website, but want to stay away from creating individual pages for each individual video.

I want to create a "generic" page that would display the videos.

(2013-11-14, 15:19:22)saint Wrote: I do not want a playlist.

I want to show each video individually on seperate pages, as previously stated.

So You want a page to display the video's (playlist makes sense), or want "to show each video individually on separate pages"? But I thought you didn't want that...
Reply
#6
I greatly apologize for my miscommunication.

I do not want individual pages - I want the videos to appear as if they are on individual pages. IE - only one video showing on the generic page.
Reply
#7
Make an array of yt ids , loop them, use it to store titles or descriptions if you want.
Then have the link pass it via querystring to a video page ises its own ID to get the video id ( to avoid querystring poisoning attacks ) and then do your thing.

the rest is basic web design, same page list if not a videoid else show video etc.

this is not functioning code
PHP Code:
$array = array(
'video1' => array('123412342','title','description'),
...
);

// show a list
foreach($array as $video){
echo 
"<a href=\"url?videoid=".$video[0]."\">".$video[1]."</a></br>";
}

// video page 
if isset($_get['videoid']){
embed blah blah videourl?$array[$_get['videoid']][0]

NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#8
thanks for the informaiton
Reply




Users browsing this thread: 1 Guest(s)