Skip to content

DEADF00D/parse-torrent-name-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

parse-torrent-name-php

Extract media information from torrent-like filename.

This is a fork / port of the awesome libraries from jzjzjzj and divijbindlish.

Extract primary informations from a torrent downloaded filename into an information array. This fork only support the extraction of few tokens, like the title, the year, container, resolution. The primary use of it, is to make automatic rescue of informations on movie databases.

Example: The.Matrix.1999.1080p.BrRip.x264.YIFY.mp4

Array
(
    [year] => 1999
    [resolution] => 1080p
    [quality] => BrRip
    [codec] => x264
    [container] => mp4
    [title] => The Matrix
)

Demo:

<?php
include("PTN.php");

$ptn=new PTN();
$infos=$ptn->parse("The.Matrix.1999.1080p.BrRip.x264.YIFY.mp4");
echo "This really cool movie is: ".$infos['title'];
?>

About

Extract media information from torrent-like filename.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages