Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php async curl request

/* to send a non blocking/async request when you don't need response
one apprach is to just call exec in the background like so: */
$url="https://myurl.com/test.php";
exec("curl '$url' >/dev/null 2>&1 &");

//note: If you are sending lots of requests use curl_multi_init instead
 
PREVIOUS NEXT
Tagged: #php #async #curl #request
ADD COMMENT
Topic
Name
8+4 =