PHP code example of pxgamer / wwt-simple-upload
1. Go to this page and download the library: Download pxgamer/wwt-simple-upload 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 / wwt-simple-upload example snippets
use pxgamer\WorldWideTorrents\Uploader;
$apiKey = getenv('WWT_API_KEY');
$content = [
'name' => '', // The uploaded torrent's title
'torrent_file' => 'C:\a.torrent', // The full path to the torrent file
'category_id' => 39, // The category ID
];
$data = Uploader::upload($apiKey, $content);