Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4384

Re: Running function in the background?

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: Running function in the background?
Date 2012-01-09 20:43 -0500
Organization A noiseless patient Spider
Message-ID <jeg53c$kb2$1@dont-email.me> (permalink)
References <jeg4fm02opn@news1.newsguy.com>

Show all headers | View raw


On 1/9/2012 8:32 PM, John Drako wrote:
> I have a site where users can download files, and I want to enable the
> users to request files by email. Some of those files are big (not too
> big for email attachements).
>
> What I would like to have the user be able to do is to click on a file
> and have it emailed to him, but the user shouldn't have to wait for the
> emailing function to finish (tens of seconds some time) and continue
> browsing and clicking on other files to email or even leave the site
> confident that they'll receive the files in their email later.
>
> So I would like the emailing functionality to happen in the background
> and independent from the connection to the browser.
>
> Is this possible? Is it doable in PHP directly?
>

You can do it by executing a system script (i.e. bash) in the 
background.  But you have to have privileges to do it, which are not 
normally possible on shared hosting.

What's the problem with just downloading the file?  Users are used to 
downloading big files (some I've had to get are > 1.8GB GPS maps).

Additionally, it might be ok for your system to send a huge file - but 
may NOT be ok for the user's mail server to ACCEPT a big file.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Running function in the background? John Drako <jbravo556@gmail.removethis.com> - 2012-01-09 20:32 -0500
  Re: Running function in the background? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-09 20:43 -0500
  Re: Running function in the background? The Natural Philosopher <tnp@invalid.invalid> - 2012-01-10 02:06 +0000
  Re: Running function in the background? Michael Joel <no@please.com> - 2012-01-09 21:50 -0500
    Re: Running function in the background? Luuk <Luuk@invalid.lan> - 2012-01-10 11:50 +0100
    Re: Running function in the background? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-10 07:52 -0500
  Re: Running function in the background? Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-10 02:03 -0800
    Re: Running function in the background? John Drako <jbravo556@gmail.removethis.com> - 2012-01-11 08:40 -0500
  Re: Running function in the background? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-10 17:29 +0100
    Re: Running function in the background? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-10 17:39 +0100

csiph-web