0

I have a question regarding background processing

I have a form that the visitor can fill out, and I use ajax.

when the customer click send the process page do like this

  • 1 - include api 1
  • 2 - include api 2
  • 3- include api 3
  • 4- include mail file ( send mail using PhpMailler and Amazon web service mail )

the total process time of this page is 15 second due to api process time and the time that php mailer use to send the mail ::

What I want is a way to process my form in background , the visitor should redirect to page after submit and php file should be running in background

any ideas ?

thanks

Marvos
  • 15
  • 8
  • 15 Seconds, I suggest you should have a look at the code. This much time on a form submission is, well doesn't seems okay. About your question yes its possible But with drawbacks. There's already some answers to this question. I'll see if I find it and link it here. – Abdul Rehman May 31 '16 at 10:06
  • thanks, the code withour APIs it work very vast, even when I try to send email throw php not smtp it work very faster – Marvos May 31 '16 at 10:16
  • Try this, `ignore_user_abort()` and `multi curl` will help you. http://stackoverflow.com/questions/124462/asynchronous-php-calls – Abdul Rehman May 31 '16 at 10:29
  • http://stackoverflow.com/questions/6781934/not-waiting-for-response-from-an-ajax-request – Abdul Rehman May 31 '16 at 10:31

0 Answers0