TechTuts.net

Wir bieten Tutorials!

 

 

Search:
Willkommen, Gast
Anmelden | Registrieren

Vimeo Downloader - PHP Script

Juli 8th, 2009 by Nobert

Hier hab ich mal ein alten PHP Code rausgesucht womit man Vimeo Videos Downloaden kann.
Der Code ist noch sehr einfach zu verstehen weil nur die Grundbasis besteht.

index.php

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Vimeo - Downloader</title>
</head>

<body>
<div align=”center”><br />

<h3>Vimeo Downloader [BETA]</h3>

<form action=”download.php” method=”get” />
Video-ID:
<input type=”text” size=”20″ name=”id” />
<input type=”submit” value=”Download” />
</form>
<br />
Coded by Nobert
</div>
</body>
</html>

download.php

<?php
//#######################
// Vimeo Downloader
// Coded by Nobert
// Visit: www.techtuts.net
//#######################
if(empty($_GET['id'])) {
echo “No ID found!”;
}else{
$id = $_GET['id'];

If (false == ($content = file_get_contents(’http://www.vimeo.com/moogaloop/load/clip:’ . $id))) {
echo “Vimeo is not available, please try again later!”;
}else{

If (strstr($content, “<request_signature>”)) {
list(,$pos1) = explode(’<request_signature>’, $content);
list($pos2,) = explode(’</request_signature>’, $pos1);
$request_signature = $pos2;
}else{
echo ‘request_signature string not found!’;
}

If (strstr($content, “<request_signature_expires>”)) {
list(,$pos1) = explode(’<request_signature_expires>’, $content);
list($pos2,) = explode(’</request_signature_expires>’, $pos1);
$request_signature_expires = $pos2;
}else{
echo ‘request_signature_expires string not found!’;
}

$download = “http://www.vimeo.com/moogaloop/play/clip:” . $id . “/” . $request_signature . “/” . $request_signature_expires . “/” . “?q=sd” . $id . “.flv”;

echo ‘<a href=”‘ . $download . ‘”>Download</a>’;
}
}
?>


Ich habe den Code leider nicht kommentiert weil ich glaube das er für jeden verständlich sein wird.

Ich wünsche Ihnen viel Spaß mit dem Code.
Sie können mir auch gerne Ihre Ergebnise präsentieren.
Schreiben Sie mir dazu einfach eine Email.

Posted in Scripte/Codez

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.