PHP code example of pxgamer / worldwidetorrents-php
1. Go to this page and download the library: Download pxgamer/worldwidetorrents-php 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 / worldwidetorrents-php example snippets
$client = new Client();
// Use the specific classes as their short names
use \pxgamer\WorldWideTorrents;
// Create a new Client instance
$client = new WorldWideTorrents\Client();
$client->setAuthKey('API_KEY');
// Initialise a new instance of each class
$group = new WorldWideTorrents\Group($client);
$mail = new WorldWideTorrents\Mail($client);
$torrent = new WorldWideTorrents\Torrent($client);
$user = new WorldWideTorrents\User($client);
$account = new WorldWideTorrents\Account($client);
/**
* This is passed into all other classes.
*/
use \pxgamer\WorldWideTorrents\Client;
$client = new Client;
$client->setAuthKey('API_KEY');
use \pxgamer\WorldWideTorrents\Group;
$group = new Group($client);
$group->getInfo(3);
$group->getTorrents(3);
use \pxgamer\WorldWideTorrents\Mail;
$mail = new Mail($client);
$mail->getStats(656);
use \pxgamer\WorldWideTorrents\Torrent;
$torrent = new Torrent($client);
$torrent->getInfo(656);
use \pxgamer\WorldWideTorrents\User;
$user = new User($client);
$user->getInfo(656);
$user->getTorrents(656);
// Requires the API key to be set in the Client class
use \pxgamer\WorldWideTorrents\Account;
$account = new Account($client);