Jump to content

Recommended Posts

Hi There,

 

I am building an application for a client that basically sends out SMS messages via a series of HTTP post requests to a 3rd party server.

 

I am will be using curl to loop through the numbers (around 8000) or so, and can have the script continue even if the user closes down his browser using:

 

ignore_user_abort(TRUE);

 

However, what he would like to be able to do is stop the sending, and resume again another time if need be. The resuming isnt a challenge, I can easily do a counter on each sucesful send and make note of where to start/resume next time in the list.

 

My question is, how would I go about accessing a script that is running in the background, if the user has left the page? Would I access it by a process ID or similar?

 

Im using standard Plesk8 installation on Linux.

 

Any help greatley appreciated, or even a direction on what to look for :)

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/99363-pause-resume-a-background-script/
Share on other sites

Initially I thought about outputing the html for each post, like:

 

Sending 23 of 8000 - CLICK TO PAUSE

Sending 24 of 8000 - CLICK TO PAUSE

Sending 25 of 8000 - CLICK TO PAUSE

 

But my concern would be if his connection was to time out, or perhaps was on a laptop and didnt have the power to leave it running in the browser

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.