Trying to create a logging system

  • Thread starter sheldon
  • Start date
  • Tags
    System
In summary, I am trying to create a logging system similar to this site, but I don't need all the bells and whistles, just want to add posts to a thread. I can't seem to make it update the new page with the edited information? can anybody help.
  • #1
sheldon
152
0
I am trying to create a logging system simaler to this site. I don't need all the bells and whistles, just want to add posts to a thread. I can't seem to make it update the new page with the edited information? can anybody help
 
Last edited by a moderator:
Computer science news on Phys.org
  • #3
crap I just started html and now I have to learn another language:frown:
what is CGI? http://www.jmarshall.com/easy/cgi/ I have read through this and still am unable to accomplish anything. I am not trying to make a web page that runs on an internet server. Just a log book that will add logs similar to the way you have on this site, on my computer. I may be misunderstanding but does the cgi program have to be on a server with a URL? Is there anyway to fool a normal computer into adding information to a html page like this or is it some major learning curve?
 
  • #4
CGI is the common gateway interface. People usually use PERL with CGI. You must run the website on a server to accomplish your needs. I must say it is a very large learning curve if you don't know html and want to move into a server language. Your best bet is to buy some books at barnes and noble and take a few months to learn web technologies.
 
  • #5
I can't believe there isn't an easy way to have stuff added to a simple page. HTML is for the most part simple unless you want to get crazy. Like have the form just add to the file like a paste function. This is driving me crazy. For example, when I press submit reply button on here it goes to a php or a cgi type then that file gets and then posts onto the proper page it is rather crazy how it works simple but yet not. If I want to add to a page I made I can edit and resave and there is the new text. But If I want other people to add they don't want to know html, they just want to click and type and click and there is there log. I just think it is crazy that there isn't a simple way or a compiler that will do this. Thanks though I am just frusterated.
 
  • #6
Well, there is !
If you need very customized things, you will need to learn and learn and learn (and this is why programmers come up :smile:, to do this for you).
But if you don't really care about anything special, you just need your objective done, you can use free ready codes, like (for example) if you are welling to have some forums, see the snitz forums ! http://forum.snitz.com , those will need a server that supports ASP, if you have a good budget go buy a ASP supporting host (like http://www.readyhosting.com ), if not, try to use a free ASP supporting host (like http://www.brinkster.com ).

And, if you have a good budget (i mean, a VERY good one), and need something customized, and don't want to learn, you might find some good coders easily online at http://www.rentacoder.com .


Greg, is it against the rules to redirect people on the forums to other sites ?
 
Last edited by a moderator:
  • #7
Originally posted by STAii
Well, there is !
If you need very customized things, you will need to learn and learn and learn (and this is why programmers come up :smile:, to do this for you).
But if you don't really care about anything special, you just need your objective done, you can use free ready codes, like (for example) if you are welling to have some forums, see the snitz forums ! http://forum.snitz.com , those will need a server that supports ASP, if you have a good budget go buy a ASP supporting host (like http://www.readyhosting.com ), if not, try to use a free ASP supporting host (like http://www.brinkster.com ).

And, if you have a good budget (i mean, a VERY good one), and need something customized, and don't want to learn, you might find some good coders easily online at http://www.rentacoder.com .


Greg, is it against the rules to redirect people on the forums to other sites ?

ok I bought a domain and we will see what this is about:smile:
 
Last edited by a moderator:
  • #8
hey that looks just like the old phf
 
  • #9
If you bought the domain with a hosting plan, did u check that the host supports what you are going to use (ASP or PHP) ?
hey that looks just like the old pf
Yes, the old PF was based on the Snitz forum, actually ALL the time there was a little link on the right bottom corner of EVERY page linking back to the site i gave you :smile:, but it seems only few people noticed that.
 
  • #10
yea checked it out and it does support everything I need, I am just trying to learn so we will see how well I do. I am haveing so many ideas run through my head now on what to do with the site I am getting confused, but its fun. I never saw that link on the old phf eather, I suppose because just the topics alone were enough to give me brain drain, trying to figure out why about everything can be distracting:smile:
 
  • #11
ok I downloaded snits and crap I am lost, I have to change some directories and make a database so that it will work. very confusing[?]
 
  • #13
I downloaded a guestbook and installed it but can't seem to get it to work, I am not sure if its in the cgi or what, what is cdmod?
 
  • #14
Chmod is the unix command used to set permissions on files and folders. Permissions such as read and write, Again, I highly recommend you buying some books on these subjects if your serious about using web technologies.
 
  • #15
You could always use a free embedded guest book and stick it in a html frame I have done this with satisfactory results.

Search google for 'Free guestbooks'. There maybe even be free forum type software you can link into your site. Hmm that gives me an idea ...

EDIT: This looks quite promising :http://www.theguestbook.com/
 
  • #16
Ok thanks a lot, I am on my way. This has been a great learning experience for me:)
 
  • #17
Physicist.persianblog.com

see my weblog for your resources...
 
  • #18
use this www.mamboserver.com...

PHP CMS... very good and GNU...

If you want a PHPBB use this www.phpbb.com/

Which is what this site is built on (?)

All you need is Liunx, PHP, MYSQL, Apache...
 
  • #19
Here's a script I wrote to create a simple message board for my website. It can be viewed here: http://www.hell0.com/shout.php .
PHP:
<html>
<head><title>hell0 it</title></head>
<body>


<pre>
        <a href="index.html">h  o  m  e</a>
</pre>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST">
<textarea name="message" rows="20" cols="60" wrap="virtual"></textarea>
   ascii art? <input type="checkbox" name="ascii" />
<br><input type="submit" value="hell0 it" />
</form>
<br>


<?php

/*********************************************************************************************************

 Sh0ut/hell0 it! is a simple message posting script written in PHP that does not requires only a text file
 Copyright (C) 2004 Alex Beal

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

 *********************************************************************************************************/
 
if(@$raw_message=rtrim(strip_tags($_POST['message']))) //check for string in shout
{  
  /*FORMATTING STRING*/ 
  if(strlen($raw_message)>2000) //if over 2000 characters truncate and format
  {
    $fmessage = "\n<hr> " . substr($raw_message,0,2000) . '<p>Message truncated to 2000 characters' . '<!--' . $_SERVER['REMOTE_ADDR'] . '-->';
  } else { //if under 2000 characters just format
    $fmessage = "\n<hr> " . $raw_message . "<!--" . $_SERVER['REMOTE_ADDR'] . "-->";
  }
  if(@$_POST['ascii']) //if ascii art then insert <pre> tags into $fmessage
  {
    $fmessage = substr_replace($fmessage,'<pre>',0,0) .'</pre>';
  }
  
  /*WRITING STRING TO DATABASE FILE*/
  umask(077); //make the file 077 permission
  $messagedb=fopen("shout", "r+");
  flock($messagedb,2); //stop file from being messed up
  $old_data = fread($messagedb, filesize("shout")); //get all stuff from the file (old data)
  rewind($messagedb); //to to beginning
  fwrite($messagedb,"$fmessage". "$old_data"); //write new stuff then add old data
  flock($messagedb,3); //perissions back
  fclose($messagedb); //close file
}

/*DISPLAY MESSAGE DATABASE*/
echo '<tt>'; //needed to format ascii art corretly
include "shout";
echo '</tt>';
?>

<p><b><font size="-3">Sh0ut/hell0 it! V2.3.1</b> Alex Beal (C) 2004. Released under the <a
href="[PLAIN]http://www.gnu.org/copyleft/gpl.html">GNU[/PLAIN] [Broken] GPL</a>.</font>
</body>
</html>

The way it works is it stores the messages to a text file in the same directory that the script is located. When a person wants to see the messages it spits out the text file. It's written in PHP and will need a PHP enabled host.

There are several problems with it. First, if someone spammed it a lot the text file that stores the messages could become very very large. Also, if many people post messages at the same time the file containing the messages could become mangled. I tried to prevent that with the "flock()" call.

Files:
Linux http://www.hell0.com/files/shout-2.3.1.zip

Go ahead and edit it, add a login system, whatever. It's released under the GNU GPL.
 
Last edited by a moderator:

1. How does a logging system work?

A logging system is a tool used to track and record events that occur within a system or software. It collects data from various sources and stores it in a central location, making it easier to analyze and troubleshoot any issues that may arise.

2. What are the benefits of implementing a logging system?

A logging system can provide valuable insights into the performance and behavior of a system. It can help identify and resolve errors and bugs, monitor system health, and track user activity. Additionally, it can be used for auditing purposes and to comply with regulatory requirements.

3. What are the key components of a logging system?

A logging system typically includes a logger, which is responsible for capturing and formatting the data, and a logging library, which provides the necessary functions and methods for recording the data. It also requires a storage mechanism, such as a database or file, to store the data and a viewer or analyzer to view and interpret the data.

4. How can I ensure the security of my logging system?

To ensure the security of a logging system, it is important to implement proper access controls and encryption methods. Limiting access to only authorized users and encrypting sensitive data can help prevent unauthorized access and protect the integrity of the logged data.

5. Can I customize a logging system to fit my specific needs?

Yes, logging systems can be customized to fit the specific needs and requirements of a system or software. This can include selecting which data to log, setting up alerts for certain events, and integrating with other tools and systems. It is important to carefully design and plan the logging system to ensure it meets the desired objectives.

Similar threads

  • Computing and Technology
Replies
28
Views
2K
  • Computing and Technology
Replies
30
Views
1K
  • Computing and Technology
Replies
20
Views
581
Replies
6
Views
6K
  • Feedback and Announcements
Replies
6
Views
978
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
13
Views
1K
Replies
3
Views
3K
  • Computing and Technology
Replies
20
Views
3K
  • Computing and Technology
Replies
3
Views
2K
Back
Top