简体   繁体   中英

Sending post request and do not wait for reply and continue php script

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

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.

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

将请求放入队列(可能是数据库)中,并有一个单独的脚本,该脚本定期运行并执行队列中的请求。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM