Login   Register  
PHP Classes

File: demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rabotyahoff Alexandr  >  Video providers  >  demo.php  >  Download  
File: demo.php
Role: Example script
Content type: text/plain
Description: demo script
Class: Video providers
Get HTML to embed and preview videos given the URL
Author: By
Last change: added dailymotion.com
Date: 2 years ago
Size: 1,162 bytes


Class file image Download
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <form method="get">
    <label>video link (youtube.com, vimeo.com, rutube.ru, dailymotion.com):</label>
    <input type="text" name="link">
    <input type="submit">


if (!empty($_GET)){


    if (!empty(
$o_video_providers=new c_video_providers();

        if (
"video provider isn't support<br>";
        else {
"video code: $video_code<br>";
"link: <a href='".$video_info['url_watch']."'>".$video_info['url_watch']."</a><br>";
"preview small: <img src='".$video_info['url_img_preview']['small']."'><br>";
"preview medium: <img src='".$video_info['url_img_preview']['medium']."'><br>";
"preview large: <img src='".$video_info['url_img_preview']['large']."'><br>";
"video: ".$video_info['embed']."<br>";