FB PagesCleaner

Delete Your Page Posts

Pages Unliker

Unlike All FB Pages

Handy FB Scripts

Free FB Extensions

Social Media Scripts

G+,LinkedIn & Other

Youtube API For Your Website/Blog

 

 

 

This article will show you how to install youtube API for your website or blog. 

 

English Tutorial : https://youtu.be/xL2ivAM0lD0
Arabic Tutorial  :  https://youtu.be/f5z_axUxp_k
 

Part A: Installation

To install youtube API,Save this code in new PHP file, include it in your website : 

CODE 
  1. <?php
    //check http://khalil-shreateh.com/khalil.shtml/index.php/online-tools/youtube-api.html for variables informations .
     
    $cid="";
    $total="";     
    $rand="";
    $randfrom="";
    $width="";
    $align="";
     
    // javascript variables
    $theme="";  
    $animation="";
    $close_animation=""; 
     
     
    $url='http://khalil-shreateh.com/Applications/Youtube-API/?cid='.$cid;
    $url.='&total='.$total.'&rand='.$rand.'&randfrom='.$randfrom.'&width='.$width.'&align='.$align;
    $url.='&theme='.$theme.'&animation='.$animation.'&close_animation='.$close_animation;
     
    $ch =curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    $rst= curl_exec ($ch);
    //$rst=rtrim($rst, "1");
    echo $rst;
    curl_close ($ch);
     
    ?>

- API variables should sent after "?" , separated by "&"
- Custom $url variable depends on your need, check Part B  . 

 

Part B: Varialbes

 

Youtube API Variables
Variable Information Demo
cid Youtube Channel ID, Click here to get it yours .
Default value: UCQ9MDlV6uH6II8iQiESpBWg
Demo
total Total video to display, number between (1-5) . 
Default value: 1, Maximum Videos: 5. (contact me for more)
Demo
randfrom

To choose videos from your latest upload. for example: if you set total = 3, randomfrom = 10, the API will pick up random 3 videos from your latest 10 videos . 
Default value: 50

Demo
width Display width . 
Default value = 200px
Demo
align Set "align" to "h" if you want to display videos horizontally. Demo
rand Set "rand" to "off" if you want to display channel latest videos  . 
Default value: random
Demo

 

Javascript Display Variables
Variable Information Demo
theme Available themes: (white, black, hololight, holodark, supervan) . 
Default value: black
Demo
animation Available animations:(right, left, bottom, top, rotate, none, opacity, scale, zoom, scaley, scalex, rotatey, rotatex) . 
Default value: rotate
Demo
close_animation

Available animations:(right, left, bottom, top, rotate, none, opacity, scale, zoom, scaley, scalex, rotatey, rotatex) . 
Default value: scaley

Demo

 

 
 

PrintEmail

Copyright © 2016 khalil shreateh Twitter/khalilshreateh

How to Claim bet365 Bonus step by step.