承接 kphoen/vex 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kphoen/vex

最新稳定版本:1.1.5

Composer 安装命令:

composer require kphoen/vex

包简介

Extract videos from any URL

README 文档

README

Vex is a PHP library to extract a video from any URL.

Supported Services

For each video-sharing website of the following list, a Platform class can identify a supported URL and extract the video data.

Status

This project is DEPRECATED and should NOT be used.

If someone magically appears and wants to maintain this project, I'll gladly give access to this repository.

Installation

The recommended way to install Vex is through composer.

{
    "require": {
        "kphoen/vex": "1.1.*"
    }
}

If you don't use neither Composer nor a ClassLoader in your application, just require the provided autoloader:

require_once 'src/autoload.php';

You're done.

Usage

use Vex\Vex;

$adapter = new \Vex\HttpAdapter\BuzzHttpAdapter();
$platform = \Vex\Platform\RutubePlatform($adapter);
$vex = new Vex($platform);

$video = $vex->extract('https://rutube.ru/video/b5a392c180ddfe3e1ebded38f9f9dc52/');

// Show the video title
echo $video->getTitle();
// Shows the embedded video HTML
echo $video->getCode();
// Show the video link
echo $video->getLink();
// Show the video duration
echo $video->getDuration();
// Show the video thumbnail
echo $video->getThumb();


$url = $vex->reverse('<iframe width="640" height="360" src="http://rutube.ru/video/embed/6236741" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen scrolling="no"></iframe>');
// shows http://rutube.ru/video/9f4dc6bc2db6b6051ea07fb20234c6cc/
echo $url

Tests

To run unit tests, you'll need cURL and a set of dependencies you can install using Composer:

php composer.phar install --dev

Once installed, just launch the following command:

phpunit

Credits

License

Vex is released under the MIT License. See the bundled LICENSE file for details.

统计信息

  • 总下载量: 351
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固