Foros del Web » Programando para Internet » PHP »

duda en crear automatico numerico y time

Estas en el tema de duda en crear automatico numerico y time en el foro de PHP en Foros del Web. hola a todos es que tengo este script @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código PHP: Ver original $expire = time ( ) + 3600 ; // At which ...
  #1 (permalink)  
Antiguo 20/08/2015, 13:54
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
duda en crear automatico numerico y time

hola a todos es que tengo este script

Código PHP:
Ver original
  1. $expire = time()+3600; // At which point in time the file should expire. time() + x; would be the usual usage.
  2.  
  3. $md5 = base64_encode(md5($secret.$expire, true)); // Using binary hashing.
  4. $md5 = strtr($md5, '+/', '-_'); // + and / are considered special characters in URLs, see the wikipedia page linked in references.
  5. $md5 = str_replace('=', '', $md5); // When used in query parameters the base64 padding character is considered special.
  6. echo 'http://dominio/video/'.$md5.'/'.$expire.'/video.mp4';

para poder obtener la url de esta manera

http://dominio/video/9G_OPrzufyoMZ6s...3961/video.flv

pero en el servicio nginx tengo esto

Código Apache:
Ver original
  1. location /video/ {
  2.           rewrite               /video/([a-zA-Z0-9_\-]*)/([0-9]*)/(.*)\.flv$ /flv/$3.flv?st=$1&e=$2;
  3.         }
  4.  
  5.         location /flv/ {
  6.           internal;
  7.           secure_link           $arg_st,$arg_e;
  8.           secure_link_md5       1234$arg_e;
  9.  
  10.           if ($secure_link = "")  { return 403; }
  11.           if ($secure_link = "0") { return 403; }
  12.  
  13.           root   html;
  14.           flv;
  15.  
  16.           add_header            Cache-Control  'private, max-age=0, must-revalidate';
  17.           add_header            Strict-Transport-Security "max-age=16070400; includeSubdomains";
  18.           add_header            X-Frame-Options DENY;
  19.         }

mi pregunta es si es posible que automatico el servicio nginx haga eso automatico

Etiquetas: automatico, html, numerico, time
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 00:50.