Example #1
0
<?php

require 'hulu.php';
require 'addict_database.php';
$hulu = new Hulu();
$ad = new AddictDatabase();
$movies = $ad->getMovies();
foreach ($movies as $movie) {
    if ($hulu->available($movie['title'])) {
        echo $movie['title'] . "<br>";
    }
}
Example #2
0
<?php

require_once '../src/Hulu.php';
$hulu = new Hulu();
switch ($_GET['method']) {
    case 'getCompanies':
        // Remove method from GET so it can be passed to the library
        unset($_GET['method']);
        // Call the method!
        $companies = $hulu->getCompanies($_GET);
        exit(print_r($companies));
        break;
    case 'getGenres':
        // Remove method from GET so it can be passed to the library
        unset($_GET['method']);
        // Call the method!
        $genres = $hulu->getGenres($_GET);
        exit(print_r($genres));
        break;
    case 'getShows':
        // Remove method from GET so it can be passed to the library
        unset($_GET['method']);
        // Call the method!
        $shows = $hulu->getShows($_GET);
        exit(print_r($shows));
        break;
    case 'getVideos':
        // Remove method from GET so it can be passed to the library
        unset($_GET['method']);
        // Call the method!
        $videos = $hulu->getVideos($_GET);