Foros del Web » Programando para Internet » PHP »

ErrorDocument to handle the request

Estas en el tema de ErrorDocument to handle the request en el foro de PHP en Foros del Web. Hola, estoy ejecutando un script de el cual localmente me funciona lo mas bien y en el servidor Hostgator.com me da este error : ---------- ...
  #1 (permalink)  
Antiguo 18/10/2009, 20:38
Avatar de hawaiian050  
Fecha de Ingreso: junio-2007
Mensajes: 285
Antigüedad: 16 años, 10 meses
Puntos: 2
Busqueda ErrorDocument to handle the request

Hola, estoy ejecutando un script de el cual localmente me funciona lo mas bien y en el servidor Hostgator.com me da este error :

---------- ERROR ------------

Forbidden
You don't have permission to access /get.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

------------- FIN -------------

Código PHP:
<?php

function mv_decrypt($str_hex$key1$key2){
  
$str_bin "";
  
// 1. Convert hexadecimal string to binary string
  
for($i 0$i 128$i++){
    
$str_bin .= floor(hexdec($str_hex[floor($i/4)])/pow(2,(3-($i%4))))%2;
  }
  
// 2. Generate switch and XOR keys
  
$key = Array();
  for (
$i 0$i 384$i++){
    
$key1 = ($key1 11 77213) % 81371;
    
$key2 = ($key2 17 92717) % 192811;
    
$key[$i] = ($key1 $key2) % 128;
  }
  
// 3. Switch bits positions
  
for ($i 256$i >= 0$i--){
    
$temp $str_bin[$key[$i]];
    
$str_bin[$key[$i]] = $str_bin[$i%128];
    
$str_bin[$i%128] = $temp;
  }
  
// 4. XOR entire binary string
  
for ($i 0$i 128$i++){
    
$str_bin[$i] = $str_bin[$i] ^ $key[$i+256] & 1;
  }
  
// 5. Convert binary string back to hexadecimal
  
$str_hex "";
  for(
$i 0$i 32$i++){
    
$str_hex .= dechex(bindec(substr($str_bin$i*44)));
  }
  
// 6. Return counted string
  
return $str_hex;
}

// Is set the "file" variable?
if(isset($_GET["file"])){
  
// Does player send video position?
  
$pos = (isset($_GET["pos"]) ? intval($_GET["pos"]) : "");
  
//Obtain Megavideo ID from link
  
preg_match_all('/[^=]*/',$_GET["file"],$match);
  
$megavideo_id $match[0][2];
  
// Obtain Megavideo XML playlist file
  
if ($content = @file_get_contents("http://www.megavideo.com/xml/videolink.php?v=".$megavideo_id)){
    
// Parameters which I want to obtain from XML;
    
$parameters = Array("un""k1""k2""s""size");
    
$success true;
    
// Obtain parameters from XML one by one
    
for($i=0$i<Count($parameters); $i++){
      
$success $success && preg_match('/ ' $parameters[$i] . '="([^"]+)"/'$content$match);
      $
$parameters[$i] = $match[1];
    }
    if(
$success){
      
// Count "dkey" from obtained parameters
      
$dkey=mv_decrypt($un,$k1,$k2);
      
// set URL address of video file
      
$video_url "http://www".$s.".megavideo.com/files/".$dkey."/".$pos;
      
// Send headers to browser
      
header("Content-Type: video/flv");
      
header("Content-Disposition: attachment; filename=video.flv;" );
      
header("Content-Length: ".$size);
      
// Read video file from Megavideo server
      
readfile($video_url);
    }
  }
}
?>
alguien tiene idea por que es y como puedo configurarlo para solucionarlo ? muchas gracias
  #2 (permalink)  
Antiguo 18/10/2009, 22:16
Avatar de abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: ErrorDocument to handle the request

Debe ser que no tienes permisos para leer ese archivo. Verifica si esta en un directorio que ese directorio tenga los suficiente permisos para poder leer el codigo.
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos
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 02:30.