我正在使用curl发出GET请求以发送短信,但是我添加了其他参数,但它不起作用
代码中未到达URL和添加的参数。它也不会引发任何错误。但是它不会发送短信
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL=>
'https://url/v1/sms/campaigns/send?api_key=whsp_54kQFKpzoNknOPs3SstRr2WAKaDSfwvos31558528300VRZuX&type=1&msg=Hell o '". $_POST['FirstName'] ." ,your registration code is ".$codeDigits."&recipients=". $_POST['PhoneNo'] . "&sender="Findpro",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
}
else {
redirect("Welcome/confirmCode");
//redirect("/Welcome/login","auto");
}
我希望在手机上收到短信。能帮我很好地使用字符串和参数以及添加空格