PHP code example of inkrement / torrent-scraper
1. Go to this page and download the library: Download inkrement/torrent-scraper 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/ */
inkrement / torrent-scraper example snippets
krement\TorrentScraper\TorrentScraperService;
date_default_timezone_set('UTC');
$scraperService = new TorrentScraperService(['ezTv', 'ThePirateBay']);
$results = $scraperService->search('elementaryos');
foreach($tracker as $tracker_results){
echo $tracker_results->getTracker()."\n";
foreach ($tracker_results->getSearchResult() as $result) {
$result->getName();
$result->getSeeders();
$result->getLeechers();
$result->getTorrentUrl();
$result->getMagnetUrl();
}
}
$scraperService = new TorrentScraperService();
//add adapter
$pirateBayAdapter = new ThePirateBayAdapter(['proxy' => 'http://username:[email protected]:3128']);
$scraperService->addAdapter($pirateBayAdapter);
$result = $scraperService->search('elementaryos');