PHP Classes

File: sample-vudu-ajax.php

Recommend this page to a friend!
  Classes of Matthew Boyle   Vudu PHP control   sample-vudu-ajax.php   Download  
File: sample-vudu-ajax.php
Role: Example script
Content type: text/plain
Description: sample
Class: Vudu PHP control
Send commands to a Vudu set top box
Author: By
Last change:
Date: 8 years ago
Size: 697 bytes
 

Contents

Class file image Download
<?php

/*

VUDU PHP control example
This is an example only meant to show how vudu.class.php
might be used

The same license applies to this example as in the class source.

Copyright (c) 2015 Matthew Boyle
*/
error_reporting(E_ERROR | E_WARNING | E_PARSE);
ini_set('display_errors',true);

include(
'vudu.class.php');

$com = isset($_REQUEST["v"]) ? strtolower($_REQUEST["v"]) : "select";

// example Vudu address
$ip = '192.168.0.17';

$vudu = new VUDU;

$vudu->vudu_set_addr($ip);

// send a command and return either an error message or the command text
if( $action = $vudu->vudu_action($com) === false ){
    die(
$vudu->error);
}else{
    die(
$vudu->com_text);
}

?>