SPUG: Web interface problem

Mikel Tidwell dragon at dreamhaven.net
Wed Mar 6 19:56:57 CST 2002


Ryan,

I'd like to say that I completely understand your script, but right now
that's not the case.  It's commented well, but I need to spend more time
with it.  I'm sure it'll be a big help.  Thanks :>

 _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _
  -- Mikel Tidwell   President: RPGamer -- http://www.rpgamer.com/
   MSNM: FireMyst    Personal Home Page -- http://dragon.rpgamer.com/
 - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ -

On Wed, 6 Mar 2002, Parr, Ryan wrote:

-> Ok, my last script was bad. Admittedly. It didn't show you how to fork it
-> and make it work at all. My boy has gone down for his nap though and I've
-> had a chance to clean this up.
->
-> Replace all HTML with your own favorite HTML or calls to your favorite
-> templating system...
->
-> -- Ryan Parr
->
-> "Those who make peaceful revolution impossible will make violent revolution
-> inevitable." -- John F. Kennedy
->
->
->
-> -----Original Message-----
-> From: Parr, Ryan [mailto:Ryan.Parr at wwireless.com]
-> Sent: Wednesday, March 06, 2002 12:02 PM
-> To: 'Mikel Tidwell'; spug-list at pm.org
-> Subject: RE: SPUG: Web interface problem
->
->
-> After the user hits submit you could send them to a page that refreshes
-> every  seconds or so, providing the user with a progress bar. Once the file
-> is 100% downloaded simply take them to the next step. You will need to
-> maintain a certain amount of state with the self-reloading CGI.
->
-> For a progress bar:
->
-> my $percent_complete = int($file_currentsize / $file_totalsize);
->
-> print <<HERE;
-> <table height="25" width="100%" border=1>
-> 	<tr>
-> 		<td width="$percent_complete%" bgcolor="navy">
-> 	</tr>
-> </table>
-> HERE
->
-> -- Ryan
->
->
-> -----Original Message-----
-> From: Mikel Tidwell [mailto:dragon at dreamhaven.net]
-> Sent: Wednesday, March 06, 2002 11:39 AM
-> To: spug-list at pm.org
-> Subject: SPUG: Web interface problem
->
->
-> Hi everyone,
->
-> I'm stumped on how to proceed on a page for a web interface I'm creating for
-> my web site.  I want to be able to download a typically large file off
-> another web server, and store it on the local server.  By large, I mean an
-> average of 20 MB or so, but up to 100 MB at a typical rate of 30K/s.
->
-> Here's how I expect it to work:
->
->  * User locates the file on another site, comes to the interface, and
-> commands the file be downloaded.
->  * Script uses either LWP or `wget` to fetch file. <Problem>
->  * Script moves on to allow the person how to name the file, etc.
->
-> Problem: Downloading a file usually takes more than two minutes.  If the
-> client doesn't time out by then, the web server will terminate the process
-> anyway (cgi time limit in Roxen).  I could simply change this limit, but I'm
-> looking for a smarter solution.
->
-> I thought about creating a child process, but I know very little about
-> fork(), or what happens to the parent in this scenario.  I also have an
-> issue with, should the child be able to download the file, notifying the
-> user that the download was complete, so he/she can continue.
->
-> If this still makes any sense, please help.  Thanks... ^^
->
->  _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _
->   -- Mikel Tidwell   President: RPGamer -- http://www.rpgamer.com/
->    MSNM: FireMyst    Personal Home Page -- http://dragon.rpgamer.com/
->  - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ -
->
->
->  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
->      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
->       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
->   Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
-> For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
->      Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
->
->
->  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
->      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
->       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
->   Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
-> For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
->      Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
->
->
->


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org





More information about the spug-list mailing list