PHP code example of paramako / pornhub-api-client
1. Go to this page and download the library: Download paramako/pornhub-api-client 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/ */
paramako / pornhub-api-client example snippets
$client = Paramako\Pornhub\Factory::create();
$client->disableHttpErrorExceptions();
$client->disableResponseWrapper();
$videos = $client->videos();
$stars = $client->stars();
$tags = $client->tags();
$categories = $client->categories();
$client->videos()->get();
$category = 'webcam';
$page = 3;
$search = 'John Doe';
$client->videos()->get($category, $page, $search);
$videoId = 'some_id_here';
$client->videos()->getById($videoId);
$client->stars()->get();
$response = $client->categories()->get();
$categories = $response['categories'];
foreach ($categories as $category) {
// do some logic here
}
$response = $client->categories()->get();
$categories = $response->categories;
$response = $client->categories()->get();
$categories = $response->getResponse(); // returns ResponseInterface
nt = new \Paramako\Pornhub\Http\Client();
$stars = new \Paramako\Pornhub\Resources\Stars($client);
$response = $stars->get();