Source for file example.php
Documentation is available at example.php
require_once 'Services/YouTube.php';
define('DEV_ID', 'YOUR_DEV_ID');
$response = $youtube->listFeatured ();
if (isset ($response->error )) {
$response = $youtube->listByTag ($tag, $page, 25 );
if (isset ($response->error )) {
$table= "<table border='1'>\n";
foreach ($response->xpath ('//video') as $i => $video) {
<a href='javascript:openVideo("{ $video->id }");'>
<img src='{ $video->thumbnail_url }' alt='{ $video->title }' /></a>
<small><a href='javascript:openVideo("{ $video->id }");'>{ $video->title }</a></small>
<small>(<a href='{ $video->url }'>Details</a>)</small>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="javascripts/prototype.js"> </script>
<script type="text/javascript" src="javascripts/effects.js"> </script>
<script type="text/javascript" src="javascripts/window.js"> </script>
<link href="themes/default.css" rel="stylesheet" type="text/css"></link>
<script type="text/javascript">
function openVideo(video_id) {
win = new Window('window_id', {className: "dialog",width:445,height:370,zIndex: 100,resizable: true,title: "Sample window",showEffect:Effect.BlindDown,hideEffect: Effect.SwitchOff,draggable:true});
win.getContent().innerHTML= '<div style="padding:10px"><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' + video_id + '"></param><embed src="http://www.youtube.com/v/' + video_id + '" type="application/x-shockwave-flash" width="425" height="350"></embed></object></div>';
<div>Here is the sample using my dev id.</div>
<a href="http://www.ganchiku.com/playgrounds/example.php">Featured List</a>
<form action="example.php" method="get">
<input type="text" name="tag" size="16" maxlength="255">
<input type="submit" value="GET TAGGED VIDEOS!">
if (isset ($_REQUEST['tag'])) {
print '<div>Here is the sample using my dev id.</div>';
print '<a href="http://www.ganchiku.com/playgrounds/example.php">Featured List</a>';
Documentation generated on Mon, 11 Mar 2019 15:28:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|