GetSimple Support Forum
Attention PHP Coding Gurus - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Off Topic (http://get-simple.info/forums/forumdisplay.php?fid=12)
+--- Thread: Attention PHP Coding Gurus (/showthread.php?tid=5371)



Attention PHP Coding Gurus - saint - 2013-11-13

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 !


RE: Attention PHP Coding Gurus - datiswous - 2013-11-14

Maybe you can make a youtube playlist and then call that playlist via:

https://developers.google.com/youtube/iframe_api_reference#Retrieving_playlist_information


RE: Attention PHP Coding Gurus - saint - 2013-11-14

I do not want a playlist.

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


RE: Attention PHP Coding Gurus - Carlos - 2013-11-14

(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.


RE: Attention PHP Coding Gurus - datiswous - 2013-11-15

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...


RE: Attention PHP Coding Gurus - saint - 2013-11-15

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.


RE: Attention PHP Coding Gurus - shawn_a - 2013-11-16

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]




RE: Attention PHP Coding Gurus - saint - 2013-11-20

thanks for the informaiton