Welcome Guest, Not a member yet? Register   Sign In
Can we process multiple urls at once in curlrequest
#1

Is there any way we can process multiple URLs  in 
PHP Code:
$client = \Config\Services::curlrequest(); 


for example, this is URL set which is coming from the database itself
PHP Code:
    $urlset = [
        'https://sdocmanager.com/api/provider/receive-hooks',
        'https://sdocmanager.com/api/provider/receive-hooks',
        'https://sdocmanager.com/api/provider/receive-hooks'
    ]; 


can we process it like this 
PHP Code:
    $res $client->request('POST'$urlset, [
          'headers' => [
              'Accept'    => 'application/json',
           ],
           'json' => $clientData
    
]); 


I don't wanna iterate this as data will be the same for all the URLs. Kindly lemme know if there is any alternative way to achieve this.

Thanks in advance. Smile
Learning Codeigniter 
Reply
#2

You can download files parallelly directly from PHP CURL with multi CURL. If I can ask you, what type of project do you making?
Reply
#3

(06-13-2023, 02:36 AM)Muzikant Wrote: You can download files parallelly directly from PHP CURL with multi CURL. If I can ask you, what type of project do you making?

It's a document management application, basically, it has 3 panels admin, provider, and client.

they want to integrate with Zapier so I have to send data to webhook endpoints once a new client is added or updated, thus I need to know if we can do the same.
Learning Codeigniter 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB