-
Notifications
You must be signed in to change notification settings - Fork 148
Description
curl -H "Content-Type: multipart/form-data" -H "X-Token: token" -F payloadSend="{ "alias": "000000", "startDate": null,"endDate": null, "period": null, "recurrencesNumber": null,"recurrencesInterval": null, "validityPeriod": null, "sentNotify":false, "deliveredNotify": false, "msisdnToNotify":null, "sr": false,"campaignChannel": { "channelName": "UCP", "zone": null,"zoneType": null, "collectionTime": null }, "campaignMessage": {"messageType": null, "messageContent": "text","template": null, "file": "string", "msisdn": "000000","listMsisdn": null, "fileMsisdn": "null", "name": null,"surname": null, "extra": null, "status": "string", "delivered": "string" } };type=application/json" "https://xxxxxxxx.com/channels/UCP/campaigns?destination=msisdn&message=static&delivery=immediate&type=single"
result:
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '"alias":');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'payloadSend' => '"{');
$headers = array();
$headers[] = 'Content-Type: multipart/form-data';
$headers[] = 'X-Token: token';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
can someone help me?
thanks