Answer the question
In order to leave comments, you need to log in
How to make multiple queries run at the same time?
How to run 2 or more queries at the same time?
I use curl, that is, the request goes like this:
$post = zapros_fun('wall.get', $params_wg);
$post2 = zapros_fun('user.get', $params_ug);
How can I make them run at the same time?
Answer the question
In order to leave comments, you need to log in
elementary
php.net/manual/ru/function.curl-multi-init.php
php.net/manual/en/function.curl-multi-exec.php
Simultaneously == run simultaneously in different scripts.
PS: you can also use queues to solve some problems. The simplest implementation is to create a task in a file, a console script in the background processes and deletes it.
Read from here to the end.
And then - Parallel Programming with Pthreads in PHP - the Fu... .
In your case, it is not even necessary to perform query parallelism on the side of your server.
VK has an execute method that simultaneously executes the script passed to it (which is faster than what is currently running)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question