Announcement

Collapse
No announcement yet.

CGI/Perl Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CGI/Perl Question

    I have been spending a lot of time learning Perl. I have used it to write numerour webservices that I can use with PowerBASIC apps I distribute. So this question is probably simple. Most of my results from the Perl scripts have been text, that can be viewed in a browser. I've also generated to html formatted tables. (still text)

    So tell me, How can I control the browser to trigger the "download event"?

    Would it be the Content : tag?

    Also, what if I wanted to display the image in the browser? Would I have to write the image on the server first and use and HTML reference? or simply send the binary image to the browser for display?

    I'm trying to get an feel for how to control output from Perl/Server side to the client browser.

    (This probably should be in the Programming the Internet forum.)
    Tye
    Explorations v9.10 RPG Development System
    http://www.explore-rpg.com

  • #2
    CGI Programming

    If you don't want to spend a lot of time learning a new language to do your CGI programming then have a look at ScriptBasic. Here is a CGI tutorial I did to help others get started writing web apps. (it even shows how to access a MySQL database as well)

    CGI Tutorial

    CGI Echo - An example of a CGI program talking to itself. Notice the file upload option.

    John Spikowski
    ScriptBasic Project Manager
    http://www.scriptbasic.org
    [email protected]
    Last edited by John Spikowski; 21 May 2008, 03:53 PM.

    Comment


    • #3
      Well..

      I don't mind learning a new language.. That was the point of the little exercise. And I have seen several Perl/CGI upload scripts. My question was:

      What is the difference between displaying a bitmap (binary) on the page, and triggering the browser to DOWNLOAD the bitmap. (ie Right click Save As)

      What is sent from the server/CGI Perl to accomplish a each?

      nevermind.. found it..

      http://www.sitepoint.com/article/fil...ad-script-perl

      And it seems the Content-Type is the key.

      Content-Type:application/x-download


      Tye
      Last edited by Tyrone W. Lee; 22 May 2008, 07:43 AM.
      Explorations v9.10 RPG Development System
      http://www.explore-rpg.com

      Comment

      Working...
      X