I am using a service to send sms using php by redirecting to service page
(e.g http://example.com?receiver=38383&msg=test)
If I want to send a message to one phone number I can redirect to this page, but I want to send a lot of message using for loop.
I can’t redirect to the page because it will stop the PHP script.
I tried cURL but I don’t have any results.
Can you help me?
This is the code of cURL:
$path = "http://example.com?receiver=38383&msg=test";
$opts = array(CURLOPT_URL => $path,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_FOLLOWLOCATION => true);
$ch = curl_init();
curl_setopt_array($ch, $opts);
$return = curl_exec($ch);
curl_close($ch);
echo $return;
1 Answer