Results 1 to 4 of 4

Thread: Flat-file comment posting with XML

  1. #1
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Flat-file comment posting with XML

    I am creating a landing page for visitors and what I'am trying to setup is something like comment functionality as can be found on any typical WordPress blog.

    Because I create several different different landing pages every month, the reason I just want it real simple flat-file is so that I have more free time that is not spent on database creation ec etc.

    I can make a 777permission txt file and have people can add entries (name, website, comment) and just run a foreach loop through and display each entry so far, but I wan to have the entries written and stores into an XML file like so..
    HTML Code:
    <comment>
     <name>John Smith</name>
     <website>http://johnsmith.com</website>
     <date>7/23/2010</date>
     <comment>Hey but what about the blah blah blah</comment>
    </comment>
    But I am not very familiar with working with reading and writing to XML formated files. Thank you for any help or direction

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Look into php's simpleXML extension. I've built an XML comment script like this before.

    In the long run, however, it's not "simpler" to build this with XML vs. a database - especially if it's a more-or-less permanent feature. And it won't be as fully-featured, either: basically comment-and-forget-it.

  3. #3
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by traq View Post
    Look into php's simpleXML extension. I've built an XML comment script like this before.

    In the long run, however, it's not "simpler" to build this with XML vs. a database - especially if it's a more-or-less permanent feature. And it won't be as fully-featured, either: basically comment-and-forget-it.
    Thats all that I really want, no registration, just a good captcha to help block bots. Admitedly to my own demise I am very hands on when it comes to coding, I certainly see much to gain via using mysql and I do use it for a WP blog and another site I own. I would prefer a flat-file system for this landing page though. I will check around HotScripts or resourceindex later tonight to see if I can just download a full script because I have a deadline with many other things to do for this project. Thank you for the simpleXML tip, if I ever get some free time I will be checking that out and some example scripts out there.

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    no problem.

    Quote Originally Posted by Spinethetic View Post
    Thats all that I really want, no registration, just a good captcha to help block bots.
    [...]
    I have a deadline with many other things to do for this project...
    If you end up looking for paid help, I could add a captcha to my comment script for you. Some basic administrative functions could be an option, too. Let me know if you're interested.

    good luck!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •