File: Demo/demo.php

Recommend this page to a friend!
  Classes of Ghali Ahmed  >  PHP Media Search Engine  >  Demo/demo.php  >  Download  
File: Demo/demo.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Media Search Engine
Search multiple video sites for given keywords
Author: By
Last change: Update demo.php
Date: 5 years ago
Size: 465 bytes
 

Contents

Class file image Download
<?php
$loader
= require '../vendor/autoload.php';
require
'config_dev.php';

use
MediaGateway\Provider\ProviderChain;
use
MediaGateway\ProviderClientFactory;
use
MediaGateway\Provider\YoutubeProvider;

$youtubeProvider = new YoutubeProvider(
   
ProviderClientFactory::create('youtube', $youtubeConfig)
);

$query = new \MediaGateway\Query();
$query->setTerm('kittens')->setLimit(10);
 
$result = $youtubeProvider->search($query);

print
'<pre>';
print_r($result);


For more information send a message to info at phpclasses dot org.