optimusprime
01.Aralık.2014, 22:09
Youtube videolarını istediğiniz formatta indirtin/oynatin/dinletin
Kendi oynatıcınızda oynata bileceğiniz güzel bir kod
PHP- Kodu:
<?php
/** Ayarlar
*/
$cache_url = 'cache.xml'; //Cache Adresi
$cache_time = 30;
$video_id = $_GET['v'];
/**
*/
parse_str(file_get_contents("https://youtube.com/get_video_info?video_id={$video_id}"),$i);
if($i['status'] == 'fail' && $i['errorcode'] != '150') die(header("Location: errors/error01.mp4")); //Hata
if($i['status'] == 'fail') { //150 HATA KODU
//Cache Dosyası
if(!isset($cache_url)) $cache_url = "cache.xml";
$cache = file_get_contents($cache_url);
if( time() - $cache < $cache_time && isset($cache_time)) die(header("Location: errors/error02.mp4"));
$cache = fopen($cache_url, "w");
fwrite($cache, time());
fclose($cache);
//
$content = file_get_contents("
Kendi oynatıcınızda oynata bileceğiniz güzel bir kod
PHP- Kodu:
<?php
/** Ayarlar
*/
$cache_url = 'cache.xml'; //Cache Adresi
$cache_time = 30;
$video_id = $_GET['v'];
/**
*/
parse_str(file_get_contents("https://youtube.com/get_video_info?video_id={$video_id}"),$i);
if($i['status'] == 'fail' && $i['errorcode'] != '150') die(header("Location: errors/error01.mp4")); //Hata
if($i['status'] == 'fail') { //150 HATA KODU
//Cache Dosyası
if(!isset($cache_url)) $cache_url = "cache.xml";
$cache = file_get_contents($cache_url);
if( time() - $cache < $cache_time && isset($cache_time)) die(header("Location: errors/error02.mp4"));
$cache = fopen($cache_url, "w");
fwrite($cache, time());
fclose($cache);
//
$content = file_get_contents("