2

I need to send post request from php whithout waiting for response .

CURL has no this abillity and also wget.

I am sending many post requests to apple push servers and reply from this server is very slow and i dont need the response.

thx for help

Balvan
  • 21
  • 1
  • 2

4 Answers4

4

From the wget man page:

-b

--background

Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log.

0

Take a look at this question. It has a code sample for what you want.

Community
  • 1
  • 1
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
0

Put the requests into a queue (a database perhaps), and have a separate script which runs periodically and executes requests from the queue.

Dan Grossman
  • 51,866
  • 10
  • 112
  • 101
0

You could try setting CURLOPT_TIMEOUT. That wac curl_exec() will stop if it takes too long.

Sander Marechal
  • 22,978
  • 13
  • 65
  • 96