Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/07/2011, 17:52
dezagus
 
Fecha de Ingreso: abril-2010
Ubicación: Ping: BSAS - Arg
Mensajes: 791
Antigüedad: 16 años, 6 meses
Puntos: 25
Respuesta: Script Obtener ID Video

Código PHP:

$youtube_url 
= "http://www.youtube.com/watch?v=p4kVWCSzfK4";

if( 
strstr($youtube_url, "&") ){ 
    echo 
str_replace("http://www.youtube.com/watch?v=" , "http://www.youtube.com/embed/" , current(explode("&", $youtube_url)));
}else{
    echo 
str_replace("http://www.youtube.com/watch?v=" , "http://www.youtube.com/embed/" , $youtube_url);
} 
Solucionado, gracias :)