PHP code example of vgot / real-debrid
1. Go to this page and download the library: Download vgot/real-debrid 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/ */
vgot / real-debrid example snippets
use \RealDebrid\RealDebrid;
use \RealDebrid\Auth\Token;
$token = new Token('MY_TOKEN');
$realDebrid = new RealDebrid($token);
// Retrieve user information
$userInformation = $realDebrid->user->get();
// Unrestrict a link
$link = $realDebrid->unrestrict->link('http://MY_LINK');
// Add a magnet link and start the torrent
$torrent = $realDebrid->torrents->addMagnet('magnet:MY_MAGNET_LINK');
$realDebrid->torrents->selectFiles($torrent->id);
// Retrieve torrents list
$torrentQueue = $realDebrid->torrents->get();