Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/12/2011, 16:14
Avatar de ahaugas
ahaugas
 
Fecha de Ingreso: agosto-2011
Ubicación: Madrid
Mensajes: 249
Antigüedad: 12 años, 8 meses
Puntos: 21
Pregunta necesito una mano con curl video stream

hola veran tengo un pequeño problema, y necesito hacer un stream de un flv mediante curl y la verdad no se como hacerlo para que solo coja la ip del servidor y no del cliente.

yo lo que he echo es lo siguiente.

Código PHP:
if(empty($_GET['video'])) {
    echo 
"No se ha encontrado la ID!";
}else{
$video $_GET['video'];
}

$xml_url "$video";

        
$ch curl_init($xml_url);           
        
$cookieFile '/runtime/cookie'time().'.txt'//replace this line with code to generate a writeable path in your application
        
curl_setopt($chCURLOPT_COOKIEJAR$cookieFile); //the cookie file will be populated with cookies received while viewing the xml page   
        
curl_setopt($chCURLOPT_USERAGENT$_SERVER['HTTP_USER_AGENT']); //you need to send a user agent here and it must be the same below when you visit the video url
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
$output curl_exec($ch);
        
curl_close($ch); 
pero aqui como saco la url del video sin que me muestre caractares raros, osea solo la url que me lo lea con la ip del servidor.

tengo un script hecho parecido pero uso un spider para hacer eso y ahora no me sirve