schau dir mit nem netzwerksniffer oder nen decompiler an, was genau an den server gesendet wird, bevor der stream anfäng, also zb irgendwelche postdaten.
anschließend kannste nen httpheader hinschicken mit fsockopen oder auch mit der curl php erweiterung arbeiten.
ansonst gibts für youtube doch unzählige anbieter von browserplugins, convertertools und sonstiges.
was willste denn konkret machen?
edit://
google haste nich genutzt oder?
PHP-Code:
<?php
/*******************************************************************************
* Youtube Class
*******************************************************************************
* Author: Vikas Patial
* Email: admin@ngcoders.com
* Website: http://www.ngcoders.com
*
* File: youtube.php
* Version: 1.0.0
* Copyright: (c) 2008 - Vikas Patial
* You are free to use, distribute, and modify this software
* under the terms of the GNU General Public License. See the
* included license.txt file.
*
*******************************************************************************
* VERION HISTORY:
*
* v1.0.0 [18.9.2008] - Initial Version
*
*******************************************************************************
* DESCRIPTION:
*
* NOTE: See www.ngcoders.com for the most recent version of this script
* and its usage.
*
*******************************************************************************
*/
class youtube {
var $conn = false;
var $username = "";
var $password = "";
// login only if required ( 18+ videos )
function _login()
{
$url = "http://www.youtube.com/login?username=".$this->username."&password=".$this->password."&next=/index¤t_form=loginForm&action_login=1";
$html = $this->conn->get($url);
return strstr($html,"Sign Out")?true:false;
}
function get($url)
{
$this->conn = new Curl('youtube');
$html = $this->conn->get($url);
if (strstr($html,'please verify you are 18'))
{
if(!$this->_login())
{
return false;
}
$this->conn->cookie = 'is_adult=1';
$html = $this->conn->get($url);
}
if(!preg_match('/"video_id": "(.*?)"/', $html, $match) || !preg_match('/"t": "(.*?)"/', $html, $match1))
{
return false;
}
$var_id = $match[1];
$var_t = $match1[1];
$this->conn = new Curl('youtube');
$url = "http://www.youtube.com/get_video?video_id=".$var_id."&t=".$var_t;
$this->conn->follow = false;
$this->conn->header = true;
$html = $this->conn->get($url);
if(preg_match('/Location: (.*?)[\r\n]+/',$html,$match))
{
return $match[1];
}
return $url;
}
}
erster treffer bei
http://www.google.de/search?q=php+yo...ient=firefox-a
edit2://
wenn du es noch einfacher haben willst.
PHP-Code:
<?php $vid = file_get_contents(http://www.youtube.com/get_video?video_id=4C-rgHEdDrI&t=vjVQa1PpcFMbmAc8vXduZBzCcN3_p2ZzQQ_CYZ9KXQ4%3D; ?>)
so den rest schaffste aber nun alleine !!