pavelplzak/hubtraffic-api

Get video information from servers like redtube.com, pornhub.com and youporn.com

1.1.2 2019-09-14 09:26 UTC

This package is auto-updated.

Last update: 2024-04-14 19:22:28 UTC


README

Get video information by url

$api = new \HubtrafficApi\Api;
$video = $api->getVideoByUrl('http://www.pornhub.com/view_video.php?viewkey=ph57c67facc4ab2'); 

Or by source and id

$api = new \HubtrafficApi\Api;
$details = $api->parseSourceAndId('http://www.pornhub.com/view_video.php?viewkey=ph57c67facc4ab2');
$video = $this->getVideo($details['source'], $details['id']);

Check if video is active

$video; // some video
$api = new \HubtrafficApi\Api;
if (!$this->isVideoActive($video->source, $video->sourceId)) {
	// delete
}

Supported servers: redtube.com, pornhub.com, youporn.com, tube8.com, spankwire.com