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


Messages In This Thread
Can we process multiple urls at once in curlrequest - by SubrataJ - 06-13-2023, 12:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB