PHP code example of svilborg / php-roku

1. Go to this page and download the library: Download svilborg/php-roku library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

svilborg / php-roku example snippets



$roku = new \Roku\Roku("192.168.72.10", 8060, 0.2);

$roku->up();

$roku->select();

$roku->literals("[email protected]");

$roku->down();

$roku->down();

$roku->select();




$roku = new \Roku\Roku("192.168.72.10", 8060, 0.2);

$applications = $roku->apps();

foreach ($applications as $application) {
    echo $application->getId();
    echo $application->getVersion();
    echo $application->getName();
    echo "\n";
}




$roku = new \Roku\Roku("192.168.72.10", 8060, 0.2);

$device = $roku->device();

echo $device->getSerialNumber();
echo $device->getModelName();
echo $device->getModelDescription();
// etc..


json
{ 
    "ilborg/php-roku": "dev-master"
    }
}
bash
php composer.phar install