Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/01/2008, 16:34
Avatar de Shiryu_Libra
Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 19 años, 8 meses
Puntos: 88
Re: Convertir PHP en ASP

sera asi???

Código PHP:
<%
function 
estampa()
    
dte = now()
    
yr = year(dte)
    if 
len(month(dte)) = 1 then mth= 0 & month(dte) else mth= month(dte) End if
    if 
len(day(dte)) = 1 then dy= 0 & day(dte) else dy= day(dte) End if
    if 
len(hour(dte)) = 1 then hr=0 & hour(dte) else hr= hour(dte) End if
    if 
len(minute(dte)) = 1 then min= 0 & minute(dte) else min= minute(dte) End if
    if 
len(second(dte)) = 1 then sec = 0 & second(dte) else sec= second(dte) End if
    
estampa = yr & mth & dy & hr & min & sec
end 
function

Function 
RandomNumber(inicio, fin)
Randomize()
RandomNumber = Int((fin - inicio + 1) * Rnd + inicio)
End Function
metodo=request.ServerVariables("REQUEST_METHOD")
if 
metodo="POST" then
    
if isnull(request.Form("timestamp")) or isempty(request.Form("timestamp")) then
        timestamp
=estampa()
    else
        
timestamp=request.Form("timestamp")
    
end if
elseif 
metodo="GET" then
    
if isnull(request.querystring("timestamp")) or isempty(request.querystring("timestamp")) then
        timestamp
=estampa()
    else
        
timestamp=request.querystring("timestamp")
    
end if
end if

l = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum"
for i = 0 to 10
randomize
()
s = RandomNumber(0, len(l)-10)
e = RandomNumber(s, (len(l) - len(s))+10)
str = mid(l, s, e)

response.Write "<<<HERE_DOC<div><div>"&_
"<span class=""ctr"">" & s &_
"</span><span class=""content"">Request timestamp: " &_
timestamp 
&" - "& str &_
"</span></div></div>HERE_DOC;"
next
%> 
sera???
__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra