Login   Register  
PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vagharshak Tozalakyan  >  YouTube Parser  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: YouTube Parser
Get the video download URL for a YouTube video
Author: By
Last change:
Date: 6 years ago
Size: 629 bytes


Class file image Download


if (isset(
$_POST['url'])) {
$parser = new YouTubeParser();
$url trim(stripslashes($_POST['url']));
    if (!(
$link $parser->getVideoLink($url))) {
    } else {
'<a href="' $link '">DOWNLOAD VIDEO</a>';
'<br /><br />';


<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="url" value="<?php echo htmlspecialchars($url); ?>" style="width: 300px" />
<input type="submit" value="Go" />