Display the contents of a .txt file on a webpage


Recommended Posts

Not sure where this should be posted, Mods please move to proper place.

I need to find a way to take a .txt/.log file and

A) Upload it to a web server everytime the file changes (Preferably automatically)

B) Take that .txt/.log file once it is uploaded and display it's contents on a webpage (Refreshing everytime the uploaded file changes)

Thank you in advance for your help.

*note* for those of you that want to know why I would want to do such a thing...

I have a private Irc room that I would like to monitor from a mobile device like my PsP, unfortunately There is no easy way to use Irc via PsP (Without hacking the stock firmware) and I would like to avoid that if possible. there was a PsP Web portal at pspirc.com, but they shut down and it doesn't look like they will return, and ircatwork.com will not display properly on PsP.

Any other ways to do this, suggestions or the like are appreciated.

1) find software that monitors file changes, upon change have it execute ftp and upload it. (alternatively you could have it upload every half hour by scheduled task).

2) use the object tag to embed the text file in a web page.

<object data="http://www.ietf.org/rfc/rfc1459.txt" border="1" type="text/css" width="700" height="500">
</object>

edit:

And if you want to have it automatically refresh every X seconds:

<head>
<META HTTP-EQUIV="Refresh"
CONTENT="X; URL="thewebpage.html">;/head>

<body>
<object data="http://www.ietf.org/rfc/rfc1459.txt" border="1" type="text/css" width="700" height="500">
</object>
<br>
</body>

Edited by bigflavor

Thank you Big flavor for the response, only one thing remains..... The file is local and I have no clue how to put all of this info together, so I need a bit more help.

the .html file is in c:\program files\mirc\AC1 Logged.htm and the .txt/.log file is in c:\program files\mirc\#AC1.log

The "webserver" I have is Analog X Simpleserver pointed to c:\program files\mirc\AC1 Logged.htm as it's index file.

I can view the "page" via the Local network, but the text of the .log file is not appearing.

What do I need to do still???

Contents of AC1 Logged.htm Below

<html>

<head>

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<META HTTP-EQUIV="Refresh"

CONTENT="30; URL="file:///c:\program files\mirc\AC1 Logged.html">

<title>#AC1 Logged</title>

</head>

<body>

<object data="file:///c:\program files\mirc\#AC1.log" border="1" type="text/css" width="700" height="500">

</object>

<br>

</body>

</html>

Thank you for your help.

OK, I have got it worked out...to a point.

&lt;html&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV="Refresh"
CONTENT="30; URL=file:///c:/program files/mirc/AC1 Logged.htm"file:///c:\programs\mirc\index.htm">;title&gt;#AC1 Logged&lt;/title&gt;
&lt;base href="file:///c:\program files\mirc\index.htm" target="_self"&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p align="left"&gt;
&lt;IFRAME frameBorder=1 height=272 width=480 marginHeight=0 marginWidth=1 src="AC1.txt" name="AC1" scrolling="yes"&gt;
&lt;/IFRAME&gt;

&lt;/body&gt;

&lt;/html&gt;

I can display the .log/.txt file in an Iframe, now for the fun part.

The iframe will only display .txt files within itself, if I use a .log file it pops up in notepad outside of the web page.

is there any way to get the .log file in the iframe?

If not is there a program that can automatically convert .log to .txt at regular intervals, say 30 seconds?

(As Mirc will only output in .log, and I need the file in .txt)

Thank you in advance as always.

  DarkTorizo said:
OK, I have got it worked out...to a point.

&lt;html&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV="Refresh"
CONTENT="30; URL=file:///c:/program files/mirc/AC1 Logged.htm"file:///c:\programs\mirc\index.htm">;title&gt;#AC1 Logged&lt;/title&gt;
&lt;base href="file:///c:\program files\mirc\index.htm" target="_self"&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p align="left"&gt;
&lt;IFRAME frameBorder=1 height=272 width=480 marginHeight=0 marginWidth=1 src="AC1.txt" name="AC1" scrolling="yes"&gt;
&lt;/IFRAME&gt;

&lt;/body&gt;

&lt;/html&gt;

I can display the .log/.txt file in an Iframe, now for the fun part.

The iframe will only display .txt files within itself, if I use a .log file it pops up in notepad outside of the web page.

is there any way to get the .log file in the iframe?

If not is there a program that can automatically convert .log to .txt at regular intervals, say 30 seconds?

(As Mirc will only output in .log, and I need the file in .txt)

Thank you in advance as always.

You could schedule a task that:

copy *.log *.txt

del *.log

or what not...

Why do you have to use an iframe? The object tag specifies that it's an embedded type (in this case a text file).

If you have to do that... make another html that contains the object tag stuff, then set that as the source for the iframe.

You shouldn't have to use an iframe. Scrap the meta refresh on the main page, and put it on the page contained in the iframe (not sure how this will be handled though). Test it.

  disturb3d said:
Or if thats too much for you, why dont you use a web based IRC client?

Is there one that isn't java? The PSP probably doesn't support java(?).

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Fresh leak suggests OnePlus Pad Lite in the works, key specs revealed by Sagar Naresh Bhavsar OnePlus recently unveiled the mid-range OnePlus 13s and the OnePlus Pad 3 Android tablet in India (the tablet is also coming to the U.S.). Now, it appears that the company is working on another tablet, this time, a budget model called the OnePlus Pad Lite. Supposedly, it will be the successor to the OnePlus Pad Go, which launched in the U.K., India, and European countries. According to the leaked images, OnePlus Pad Lite follows the same design elements as earlier OnePlus tablets. The tablet is shown to have a circular camera at the center of the rear panel, with the logo sitting in the middle. The USB-C port and speaker grills are located on the right side frame of the tablet. The alleged OnePlus Pad Lite measures 254.9 x 166.5 x 7.4mm and weighs 539 grams, which is slightly taller, wider, and thinner, but weighs less compared to the OnePlus Pad Go. The tablet, courtesy of 91Mobiles and OnLeaks, is displayed in blue, which could be the only color option. One image shows the tablet with a cover that doubles as a kickstand, but may be sold separately. Gallery: OnePlus Pad Lite Based on the leaked specs, the OnePlus Pad Lite could feature an 11-inch LCD 1920x1080 resolution 90Hz display. It could be powered by the MediaTek Helio G100 processor and paired with the Mali G57 GPU. The tablet may come with 6GB of RAM and 128GB of onboard storage, with more storage and RAM options available at launch. Reportedly, the OnePlus Pad Lite could feature a 5MP primary camera and a 5MP selfie camera. Under the hood, it could be juiced by a 9,340 mAh battery. On the software side, OnePlus Pad Lite may come with OxygenOS 15.0.1 based on Android 15 out of the box. There is no clarity on which market OnePlus plans to launch the OnePlus Pad Lite in. However, the report suggests that it could be priced under ₹20,000 (roughly $231). Images by 91mobiles x OnLeaks
    • Zen Browser 1.13b by Razvan Serea Zen Browser is a privacy-focused, open-source web browser built on Mozilla Firefox, offering users a secure and customizable browsing experience. It emphasizes privacy by blocking trackers, ads, and ensuring your data isn't collected. With Zen Mods, users can enhance their browser experience with various customization options, including features like split views and vertical tabs. The browser is designed for efficiency, providing fast browsing speeds and a lightweight interface. Zen Browser prioritizes user control over the browsing experience, offering a minimal yet powerful alternative to traditional web browsers while keeping your online activity private. Zen Browser’s DRM limitation Zen Browser currently lacks support for DRM-protected content, meaning streaming services like Netflix and HBO Max are inaccessible. This is due to the absence of a Widevine license, which requires significant costs and is financially unfeasible for the developer. Additionally, applying for this license would require Zen to be part of a larger company, similar to Mozilla or Brave. Therefore, DRM-protected media won't be supported in Zen Browser for the foreseeable future. Zen Browser offers features that improve user experience, privacy, and customization: Privacy-Focused: Blocks trackers and minimizes data collection. Automatic Updates: Keeps the browser updated with security patches. Zen Mods: Customizable themes and layouts. Workspaces: Organize tabs into different workspaces. Compact Mode: Maximizes screen space by minimizing UI elements. Zen Glance: Quick website previews. Split Views: View multiple tabs in the same window. Sidebar: Access bookmarks and tools quickly. Vertical Tabs: Manage tabs vertically. Container Tabs: Separate browsing sessions. Fast Profile Switcher: Switch between profiles easily. Tab Folders: Organize tabs into folders. Customizable UI: Personalize browser interface. Security Features: Inherits Firefox’s robust security. Fast Performance: Lightweight and optimized for speed. Zen Mods Customization: Deep customization with mods. Quick Access: Easy access to favorite websites. Open Source: Built on Mozilla Firefox with community collaboration. Community-Driven: Active development and feedback from users. GitHub Repository: Contribute and review the source code. Zen Browser 1.13b changes: New Features There's a new way to manage spaces, which brings a more intuitive and user-friendly experience Updated to firefox 139.0.4 Added support for Google safebrowsing for better security Collapsed toolbarr gets a slight UI redesign Fixes Fixed issues related to glance and split view Fixed performance issues and high GPU usage for some users Other small fixes and improvements Breaking Changes Customizable UI buttons at the bottom has been reset to a new default state Download: Zen Browser | 73.6 MB (Open Source) Download: Zen Browser ARM64 | Other Operating Systems View: Zen Browser Home Page | Screenshots 1 | 2 | Reddit Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • TBF, it has had PST support for quite a while now. But I still want them to add the ability to drag & drop between accounts / PSTs.
    • LibreOffice closes in on Microsoft Office, leaves Windows 7/8 behind in 25.8 Beta 1 by David Uzondu The Document Foundation has released LibreOffice 25.8 Beta 1 for public testing on Linux, macOS, and Windows. This is the second pre-release for the 25.8 cycle and the foundation says that the final, stable version of LibreOffice 25.8 is expected to land at the end of August 2025. Starting off with Writer, LibreOffice's Word, the developers have finally addressed some long-standing annoyances, including a new command to easily insert a paragraph break right before a table. This beta also introduces a useful privacy feature in its Auto-Redact tool, letting you strip all images from a document with a single option. To use it, go to Tools and select the Auto-Redact option: The application has improved its ability to handle different languages for punctuation, preventing mix-ups in multilingual documents. Other notable improvements have also been made. A new hyphenation rule lets you choose to prevent a word from splitting at the end of a page, moving the whole line to the next page instead. Microsoft Word has had this feature for years now. The Navigator now displays a handy tooltip with word and character counts for headings and their sub-outlines. Scrolling behavior when selecting text has been improved, making it less erratic. A new command with a keyboard shortcut was added for converting fields into plain text. Calc gets a lot of new functions that bring it closer to its competitors like Excel, including TEXTSPLIT, VSTACK, and WRAPROWS. Impress now properly supports embedded fonts in PPTX files, which should reduce headaches when sharing presentations with PowerPoint users. Alongside these additions, the project is also cleaning house; support for Windows 7, 8, and 8.1 has been completely dropped. There are also smaller UI tweaks across the suite, like allowing a single click to enter rotation mode for objects in Writer and Calc. macOS users get better integration, with proper support for native full screen mode and new window management features from the Sequoia update. In terms of performance, the team has optimized everything from loading huge DOC files and XLSX spreadsheets with tons of conditional formatting to simply switching between sheets in Calc. These improvements should be noticeable, especially when working with complex documents. A new application-wide "Viewer mode" has also been implemented, which opens all files in a read-only state for quick, safe viewing. On a related note, The Document Foundation has joined efforts by the likes of KDE to encourage Windows 10 users to switch to Linux. Also, you might have heard that Denmark, in a bid to lessen its reliance on Microsoft, has decided to make a full switch to LibreOffice, with plans to begin phasing out Office 365 in certain ministries as early as next month. If you're interested in this release, you can read the full release notes and download the binaries for your platform: Windows, macOS (Intel | Apple Silicon), or Linux (DEB | RPM). You can also get the latest stable version from our software stories page.
  • Recent Achievements

    • Week One Done
      julien02 earned a badge
      Week One Done
    • One Year In
      Drewidian1 earned a badge
      One Year In
    • Explorer
      Case_f went up a rank
      Explorer
    • Conversation Starter
      Jamie Smith earned a badge
      Conversation Starter
    • First Post
      NeoToad777 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      544
    2. 2
      ATLien_0
      227
    3. 3
      +FloatingFatMan
      160
    4. 4
      Michael Scrip
      113
    5. 5
      +Edouard
      104
  • Tell a friend

    Love Neowin? Tell a friend!