Foros del Web » Programando para Internet » PHP »

php con streaming

Estas en el tema de php con streaming en el foro de PHP en Foros del Web. se puede configurar streaming a traves de php si alguien me puede contestar se lo agradeceria y si existe si me puede orientar como puede ...
  #1 (permalink)  
Antiguo 07/03/2011, 20:34
 
Fecha de Ingreso: marzo-2011
Mensajes: 1
Antigüedad: 13 años, 1 mes
Puntos: 0
se puede configurar streaming a traves de php si alguien me puede contestar se lo agradeceria y si existe si me puede orientar como puede entrarle

tengo un proyecto en pie me gustaria implementar esta forma

Última edición por GatorV; 08/03/2011 a las 09:55
  #2 (permalink)  
Antiguo 08/03/2011, 02:01
Avatar de sigher  
Fecha de Ingreso: enero-2011
Mensajes: 46
Antigüedad: 13 años, 3 meses
Puntos: 0
Respuesta: php con streaming

Tengo este trozo de codigo para Streaming de recopilaciones web, quiza pueda sevirte...
Código PHP:
<?php
////////////////////////////////////////////////////////////////////////////////////////////////
//Video Streaming PHP Script using MySQL database By: Codex-m
//Website: http://www.php-developer.org
//License: Open source 
//Link to the developer website is highly appreciated, thanks.
//Revision 1.0 February 4, 2011 Use absolute server path to the video file 
//instead of http://www.example.com/videofolder/video.mpg in the PHP read file function
//Refer to this documentation for details: http://www.php-developer.org/videostreaming.php
////////////////////////////////////////////////////////////////////////////////////////////////

//Validate text input
if (! preg_match('/^[-a-z.-@,\'\s]*$/i',$_GET['ID']))
{
  die(
'Invalid name proved, the name may only contain a-z, A-Z, 0-9, "-", "_" and spaces.');
}
else
  
$empty=strlen($_GET['ID']);
if (
$empty==0)
{
  die(
'The text field cannot be empty');
}
else
{
   
//the input data is clean, retrieve text data input
   
$ID $_GET['ID'];
}
include 
'/home/absolutepath/to/yourdatabaseconnectionscript.php';
//Escape variables for use in MySQL
$ID mysql_real_escape_string(stripslashes($ID));
//sending query
//your realurl field name in MySQL should follow the correct format as stated here:http://www.php-developer.org/videostreaming.php 
$result mysql_query("SELECT `realurl` FROM `videostreaming` WHERE `id`='$ID'")
or die(
mysql_error());
// store the record into $row
$row mysql_fetch_array$result )
or die(
"Invalid query: " mysql_error());
// Print out the contents of the entry
$direction $row['realurl'];
//close the connection
//change the path to use absolute server path, revised on February 4, 2011
$path=$direction;
header('Content-type: video/mpeg');
//2015236 is the exact file size of the video, change it to according to your video file size
header('Content-Length: 2015236');
header("Expires: -1");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0"false);
readfile($path);
mysql_close($dbhandle);
?>
  #3 (permalink)  
Antiguo 24/07/2011, 08:15
Avatar de netandino  
Fecha de Ingreso: mayo-2009
Ubicación: Perú
Mensajes: 238
Antigüedad: 14 años, 11 meses
Puntos: 3
Respuesta: php con streaming

Puedes ir por un VPS y con ello podrás hacer todo lo que requieras sobre Streaming
__________________
Net Andino| Creando Nuevas Soluciones en Informática y Sistemas
Hosting, Streaming Shoutcast y Icecast en HE-AAC, TV Video, Dominios y más

Etiquetas: streaming
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:18.