Einzelnen Beitrag anzeigen
Alt 14.03.10, 19:16   #2 (permalink)
easteregg
Member of Honour
 
Benutzerbild von easteregg
 
Registriert seit: 14.09.07
easteregg Leistung: Pentium Ieasteregg Leistung: Pentium I
easteregg eine Nachricht über ICQ schicken
Likes: 62
Standard

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&current_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 !!
__________________
» Flattr mich! - Wenn dir mein Beitrag geholfen hat! «
<| 2 AMD Opterons 2384@ 8x3,2ghz | Tyan S2915 | 10GB | 2x 8800GT | 8400GS | Dell 3008WFP + 2x2007FP |>

Geändert von easteregg (14.03.10 um 19:20 Uhr)
easteregg ist offline   Mit Zitat antworten
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61