PHP Classes

myYouYube: Manage and display videos from YouTube

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (16)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-07-16 (7 years ago) RSS 2.0 feedStarStarStar 45%Total: 2,247 This week: 1All time: 1,647 This week: 1,131Up
Version License PHP version Categories  
myyoutube 1.2Artistic License5PHP 5, Content management, Video
Description Author  

This class can be used to manage and display videos from YouTube in Web pages.

It can store the details of a video from YouTube on a MySQL database, like the video identifier, comments and ratings.

The class can also retrieve the video details stored in the database and generate HTML tags to display the video embedding it in a Web page.

Picture of José Augusto Ferreira Franco
Name: José Augusto Ferreira ... <contact>
Classes: 15 packages by
Country: Portugal Portugal
Age: 38
All time rank: 983 in Portugal Portugal
Week rank: 243 Down7 in Portugal Portugal Down
Innovation award
Innovation award
Nominee: 1x

Details provided by the author  
I´m seeying that some users don´t see  this class utility, so let me explain. 
Imagine that want a followed video session ,as movie series or video lessons. This class allows you to put all your videos  ordered with a respective menu link to navigate between each video.
You can check for a demo at

To mantain my active contribution , please rate this class on PHP classes

How to use this class

Go to youtube web site and search for some of your favourite videos, and get the respective video id, located on the video URL text field on the top 
right of the page

Example :

This video id will be    HJ0-jW8tFu8

Extract all files of my class to the  main folder of your web server

C:\Programas\EasyPHP 2.0b1\www
On EasyMysql i extact them onto the folder www

[+] System database and table is done automaticly


Edit the file  'Host_conf.php' and configure it with your Webserver settings, host , user and password.
On this version , leave database and  table name as it is , so database must be called 'videos' and table is named as 'youtube'. Otherwise you must conifg whole sistem, and inform the news values.


To add new videos , edit the file insert_videos.php and build as many arrays you will need , supplying 
video id   => Example:      HJ0-jW8tFu8
your video tag => Example:  Create Mysql Databases
Video Descrition => Example: This video shows how to create databases and tables using  MySQL
Video Rate => Example: 8 on 10 (whatever ) 
[List o changes]
Class myYouTube :: version 1.1

Add more 3 methods to manage with MySQL data. It allows to build the navigation menu all videos on database , created on file "load_videos.php"

 [+] Update 24 Março 2008 10:00 AM
     minor fix on load_video.php , see #ref  003
     bug correction on index.php , check #ref 001 and #ref 002

Regards :)
José Franco
  Files folder image Files  
File Role Description
Accessible without login Plain text file connect.php Appl. resource connection builder file
Accessible without login Plain text file Host_conf.php Appl. System package configurations file
Plain text file mysql_conn.php Class allows to manage with maysql data
Plain text file myYouTube.class.php Class The main class
Accessible without login Plain text file myYouTube.config.php Conf. The configuration file
Accessible without login Plain text file insert_videos.php Example Shwos how to insert videos
Accessible without login Plain text file load_videos.php Example Example of how to load videos
Accessible without login Image file message.gif Icon textarea image
Accessible without login Plain text file myYouTube_version_1.2_changes Doc. Changes description on version 1.2
Accessible without login Image file rate.gif Icon text field image
Accessible without login Image file send.gif Icon button image
Accessible without login Image file subject.gif Icon text field image
Accessible without login Plain text file index.php Example Allows to install script automaticly
Accessible without login Plain text file Readme.txt Doc. Some advices about testing
Accessible without login Plain text file videos.SQL Data the empty SQL table
Accessible without login Plain text file youtube.sql Data The table with some data on it

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,247All time:1,647
 This week:1This week:1,131Up
User Ratings User Comments (1)  
 All time
well done man!
7 years ago (diego)