Dismiss Notice

Psst... Ready to join TalkBass and start posting, make new friends, sell your gear, and more?  Register your free account in 30 seconds.

Web programming question

Discussion in 'Off Topic [BG]' started by leanne, Jun 11, 2004.


  1. leanne

    leanne

    May 29, 2002
    Rochester, NY
    I admit this is a silly place to ask, but I don't know where to start. So...

    I need to know which scripting or other type of web programming language will let me do the following on a web page.

    I want to allow a person to log in via the web page and access a page which has a form or something to allow that logged in person to add information. I want that info to be appended to a text file on the web server (where the web page files are located).

    Then I want to be able to parse the text file, and display certain data from that file on a web page.

    What language can I use to do this? And if there are many options, I'm looking for what I won't have to purchase a compiler or something to use. Also I'd realllllly prefer lower level languages, although I guess anything would do.

    Any input would be much appreciated.
    Thanks
    Leanne
     
  2. wulf

    wulf

    Apr 11, 2002
    Oxford, UK
    Pretty much any web scripting language will let you do all of that and much more besides. A lot depends on what's supported on the server where your page will be hosted. Personally, I'd probably pop for PHP - it's certainly worth consideration as it's incredibly powerful, widely available and free.

    BTW, what do you mean by 'lower level languages'?

    Wulf
     
  3. suicas

    suicas

    Mar 12, 2004
    UK
    Yup, for writing to a file on the web server, you'll need to use a server side scripting language, PHP, ASP, JSP or Perl should do.

    Most web hosting services charge extra for offering server side scripting though.

    I'd recommend PHP as well for simplicity, and the fact that it's free. All you should need to do is:
    1) Write some PHP code in a plain text file
    2) Save it with a .php extension, i.e. mypage.php
    3) Upload it to your web host's server
    4) Access it via http://www.example.com/mypage.php

    The server should take care of running the PHP script, you shouldn't need to download/install/compile anything.
     
  4. James Hart

    James Hart

    Feb 1, 2002
    toms_river.nj.us
    Endorsing Artist: see profile
    either PERL or PHP will do fine. Most mailer scripts will write to file. The parse and publish (or include) are basic functions of both (though if you need to heavily manipulate the text file, I'd vote PERL). Simple directory passwording is an easy line addition to your .htaccess file on Apache. Microsoft's ever hacked IIS has the ability to password directories too (from within the IIS control panel if memory serves... it's been 4 or 5 years since I admined an IIS box).
     
  5. James Hart

    James Hart

    Feb 1, 2002
    toms_river.nj.us
    Endorsing Artist: see profile
    I've never paid (or charged) extra for Perl (either on *nix or Windows)... I currently host at a place that is standard with PHP and Perl.
     
  6. leanne

    leanne

    May 29, 2002
    Rochester, NY
    Thanks all for the info. I'll probably check out PHP but I used to use Perl, but it has been close to 10 years (???)
    ie: assembly for low level, visual basic for high level
    I'm more used to the lower level stuff so that's what I find easier.
     
  7. wingnutkj

    wingnutkj

    Mar 27, 2003
    Scotland
    PHP and Perl are sufficiently similar that it's not too difficult to learn one if you know the other, and sufficiently different that zealots can flame for days about which is better :D
     
  8. wulf

    wulf

    Apr 11, 2002
    Oxford, UK
    Those are the definitions I'd use as well - I just wanted to check you weren't using "low level" === "easy" && "high level" === "complex" :smug:

    Both Perl and PHP share quite a lot syntax in common with C. Both are very flexible, although if you want a language where you can demonstrate wizardly skill by completing any task with a single line of obfuscatamongous code then Perl is more likely to be your bag. However, both are freely and widely available so you might as well try both and see which appeals most.

    Wulf
     
  9. Jeffrey A-Bomb

    Jeffrey A-Bomb Drink Coffee & Destroy Supporting Member

    Oct 14, 2000
    Silver Spring, MD
    It may be easier to use a database (rather than parsing through a text file). I've been using a SQL database w/ the ASP scripting language at work and it's pretty spiffy. Fast to. But yeah, almost all the scripting languages could do what you wanted. Perl would definately be my top pick if I did it that way (w/ the text file).
     
  10. leanne

    leanne

    May 29, 2002
    Rochester, NY
    Thanks all for the help.

    I ended up going with PHP and it has been fun. Easy, quick, and so far it meets all my needs. Very nice. Thanks! :)