FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Running function in the background?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Running function in the background? [message #176590 is a reply to message #176579] Tue, 10 January 2012 12:52 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 1/9/2012 9:50 PM, Michael Joel wrote:
> On Mon, 9 Jan 2012 20:32:43 -0500, John Drako
> <jbravo556(at)gmail(dot)removethis(dot)com> 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?
>
> Just an idea - if it sounds dumb just ignore me :)
>
> If nothing else works better. Instead of needing privileges do run
> system scrips - couldn't you create a cron job for a PHP script that
> sends emails to all records in a database?
>
> When the user clicks the link it simply adds their email address and
> fiel to email to the database. When the cron job runs it sends out an
> email with the files linked with it.
>
> just a quick thought
> Mike

A good idea if you can create cron jobs. However, it has its down
sides, also. Either you have to run the cron job quite often, taking
system resources when there is no work to do, or the user has to wait a
while before receiving the file.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: form - file - sumple question
Next Topic: Lilupophilupop
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 04:27:06 GMT 2024

Total time taken to generate the page: 0.06067 seconds