Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Trying to create a logging system

  1. Jun 14, 2003 #1
    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: Feb 5, 2013
  2. jcsd
  3. Jun 14, 2003 #2
  4. Jun 14, 2003 #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?
  5. Jun 14, 2003 #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.
  6. Jun 15, 2003 #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.
  7. Jun 15, 2003 #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: Apr 20, 2017
  8. Jun 15, 2003 #7
    ok I bought a domain and we will see what this is about:smile:
    Last edited by a moderator: Apr 20, 2017
  9. Jun 15, 2003 #8
    hey that looks just like the old phf
  10. Jun 15, 2003 #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) ?
    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.
  11. Jun 15, 2003 #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:
  12. Jun 16, 2003 #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. Jun 16, 2003 #12
  14. Jun 16, 2003 #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?
  15. Jun 16, 2003 #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.
  16. Jun 16, 2003 #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/
  17. Jun 29, 2003 #16
    Ok thanks a lot, I am on my way. This has been a great learning experiance for me:)
  18. Jul 18, 2004 #17

    see my weblog for your resources.....
  19. Jul 18, 2004 #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...
  20. Jul 18, 2004 #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 .
    <head><title>hell0 it</title></head>

            <a href="index.html">h  o  m  e</a>
    <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" />



     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
     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
      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>';
      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

    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="[URL]http://www.gnu.org/copyleft/gpl.html">GNU[/URL] GPL</a>.</font>
    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.

    Linux Windows

    Go ahead and edit it, add a login system, whatever. It's released under the GNU GPL.
    Last edited by a moderator: Apr 21, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Trying to create a logging system
  1. Linux log files (Replies: 2)

  2. Tri channel ram (Replies: 3)