Jump to content

Mostrar Archivo de un Resource en Web


Recommended Posts

Posted

Hola mucho gusto, pasa que tengo un log de un resource, pero quiero que algunos usuarios puedan verlo desde el navegador para no darles acceso FTP.

El Archivo seria este:

e707OyB.png

Intente con esto y nada.

YSzsPsW.png

nnPIqTU.png

y nada...

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
  
-- something.html 
<* 
log = fileOpen("asd.log"); 
    while not fileIsEOF(log) do 
        buffer = fileRead(log, 500); 
        httpWrite(buffer, buffer:len()) 
    end 
fileClose(log); 
*> 
  

  
<meta> 
    <html src="asd.html" /> 
    <html src="asd.log" /> 
</meta> 
  

Currently developing for International Gaming Community - Join us!

Posted
  
-- something.html 
<* 
log = fileOpen("asd.log"); 
    while not fileIsEOF(log) do 
        buffer = fileRead(log, 500); 
        httpWrite(buffer, buffer:len()) 
    end 
fileClose(log); 
*> 
  

  
<meta> 
    <html src="asd.html" /> 
    <html src="asd.log" /> 
</meta> 
  

Gracias, el problema es que se ve... mal.

du8It50.png

http://64.94.238.182:22003/EVENTO_Give/Log.html

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
¿Bajo qué sistema operativo corres el servidor?

Linux Ubuntu... algo me habia dicho Ciber...

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
¿Bajo qué sistema operativo corres el servidor?

Linux Ubuntu... algo me habia dicho Ciber...

Deberás agregar algo para usarlo como 'fin de linea', si posteas la parte del logger donde logueas te lo hago.

Currently developing for International Gaming Community - Join us!

Posted
¿Bajo qué sistema operativo corres el servidor?

Linux Ubuntu... algo me habia dicho Ciber...

Deberás agregar algo para usarlo como 'fin de linea', si posteas la parte del logger donde logueas te lo hago.

en eso me ayudo Ciber y funciono pero en documento:

https://forum.multitheftauto.com/viewtopic.php?f=145&t=89419

en el documento de texto se ve asi (Notepad ++):

3HKPpPp.png

pero en el normal de bloq de notas se ve igual que en la foto primera.

c

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted

Tienes dos formas, agregar un salto de línea (br) al final del string, o para hacerlo más estético una forma de terminarlo y luego reemplazarlo.

local written = fileWrite( file, ""..chatterName .. " ("..ussser..") envio " ..quantity.." "..item.." a " ..pName.." -->\n") 

<* 
log = fileOpen("asd.log"); 
    while not fileIsEOF(log) do 
        buffer = fileRead(log, 500); 
        buffer = buffer:gsub("-->", "<br/>"); 
        httpWrite(buffer, buffer:len()) 
    end 
fileClose(log); 
*> 

Currently developing for International Gaming Community - Join us!

Posted
Tienes dos formas, agregar un salto de línea (br) al final del string, o para hacerlo más estético una forma de terminarlo y luego reemplazarlo.
local written = fileWrite( file, ""..chatterName .. " ("..ussser..") envio " ..quantity.." "..item.." a " ..pName.." -->\n") 

<* 
log = fileOpen("asd.log"); 
    while not fileIsEOF(log) do 
        buffer = fileRead(log, 500); 
        buffer = buffer:gsub("-->", "<br/>"); 
        httpWrite(buffer, buffer:len()) 
    end 
fileClose(log); 
*> 

se ve igual, solo se ajustaron un par de lineas.

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

  • 2 weeks later...
Posted

Existe una forma de que el contenido se visualise en web pero sin que pida datos de login?

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted

Agrega el resource a un ACL, dale a ése ACL el right 'general.http', y agrega a toda la gente a ése acl ( user.* )

Currently developing for International Gaming Community - Join us!

Posted
Agrega el resource a un ACL, dale a ése ACL el right 'general.http', y agrega a toda la gente a ése acl ( user.* )

lo que quiero es poner esa web en un inframe de otra web... por eso necesito que el texto de ponga libre que no pida user ... y por lo que entiendo con lo que me dices es para que con cualquier user regrostrado pueda ver no?

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...