Narutimmy Posted July 6, 2015 Posted July 6, 2015 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: Intente con esto y nada. y nada... mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Tomas Posted July 6, 2015 Posted July 6, 2015 -- 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!
Narutimmy Posted July 6, 2015 Author Posted July 6, 2015 -- 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. http://64.94.238.182:22003/EVENTO_Give/Log.html mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Tomas Posted July 6, 2015 Posted July 6, 2015 ¿Bajo qué sistema operativo corres el servidor? Currently developing for International Gaming Community - Join us!
Narutimmy Posted July 6, 2015 Author Posted July 6, 2015 ¿Bajo qué sistema operativo corres el servidor? Linux Ubuntu... algo me habia dicho Ciber... mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Tomas Posted July 6, 2015 Posted July 6, 2015 ¿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!
Narutimmy Posted July 7, 2015 Author Posted July 7, 2015 ¿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 ++): pero en el normal de bloq de notas se ve igual que en la foto primera. c mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Tomas Posted July 7, 2015 Posted July 7, 2015 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!
Narutimmy Posted July 7, 2015 Author Posted July 7, 2015 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 Ts3: thezombiworld.com:7777
Narutimmy Posted July 19, 2015 Author Posted July 19, 2015 Existe una forma de que el contenido se visualise en web pero sin que pida datos de login? mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Tomas Posted July 20, 2015 Posted July 20, 2015 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!
Narutimmy Posted July 20, 2015 Author Posted July 20, 2015 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 Ts3: thezombiworld.com:7777
MTA Team 0xCiBeR Posted July 20, 2015 MTA Team Posted July 20, 2015 A ver si usamos el buscador eh viewtopic.php?f=145&t=88267 DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Narutimmy Posted July 20, 2015 Author Posted July 20, 2015 A ver si usamos el buscador eh viewtopic.php?f=145&t=88267 Gracias, no lo pense jeje como ya tenia un topic del tema.. y me entro la duda pregunte.. Gracias. mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Recommended Posts