PHP Classes

File: tests/index.php

Recommend this page to a friend!
  Classes of Unused   Little YouTube PHP   tests/index.php   Download  
File: tests/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Little YouTube PHP
Search and get data from YouTube videos
Author: By
Last change: Update script and add example
Fix search result
Date: 5 years ago
Size: 1,006 bytes


Class file image Download
// If you installed via composer, just use this code to require autoloader on the top of your projects.
    //require_once __DIR__."/../vendor/autoload.php";
require_once __DIR__."/../LittleYoutube.php";

    use \

$error = '';
$video = LittleYoutube::video("");
$error .= $video->error."\n";

//$channel = LittleYoutube::channel("");
    //$error .= $channel->error."\n";

    //$playlist = LittleYoutube::playlist("");
    //$error .= $playlist->error."\n";

    //$search = LittleYoutube::search("nice movies");
    //$error .= $search->error."\n";

if(str_replace("\n", '', $error)) echo('Error: '.$error);
    else echo(
"All test script running");