PHP code example of pxgamer / yts

1. Go to this page and download the library: Download pxgamer/yts 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/ */

    

pxgamer / yts example snippets


Movies::list([
    'quality'         => Movies::QUALITY_ALL, // A quality constant
    'query_term'      => 0,                   // A query string, or 0 to ignore
    'page'            => 1,                   // An integer page number
    'minimum_rating'  => 0,                   // The minimum movie rating
    'genre'           => '',                  // A string containing the genre
    'sort_by'         => 'date-added',        // The sort-by order
    'order_by'        => 'desc',              // The direction to order by
    'with_rt_ratings' => false,               // Returns the list with Rotten Tomatoes ratings
]);

Movies::details([
    'movie_id'    => null,  // The ID of the movie to retrieve
    'with_images' => false, // Return with image URLs
    'with_cast'   => false, // Return with information about the cast
]);

Movies::suggestions([
    'movie_id' => null, // The ID of the movie to retrieve suggestions for
]);