SendSMS('', 'username', 'password', '+44999999999', 'Test Message with delivery report', 'ReceiptRequested', 'Yes') This example adds an additional URL parameter, ReceiptRequested=Yes
This code provides an example of how you would call the SendSMS function from within SendSMS ( '', 'username', 'password', '+44999999999', 'Test Message with delivery report', 'ReceiptRequested', 'Yes' )
SendSMS ( '', 'username', 'password', '+44999999999', 'Test Message' ) // This example adds an additional URL parameter, ReceiptRequested=Yes This code provides an example of how you would call the SendSMS function from within // a PHP script to send a message. The second example includes an extra optional parameter to illustrate how these parameters are encoded. The first example sends an SMS text message with only the required parameters. įollowing the SendSMS function, we show two examples of how this function might be called from within a PHP script. For additional information on NowSMS URL parameters, see. The SendSMS function uses these parameters to build an HTTP POST for connecting to the NowSMS server.Īdditional optional parameters are supported.
You call this function, specifying the base URL of the NowSMS server, along with a username and password for an “SMS Users” account on the NowSMS server, plus the recipient phone number and text of the SMS message. This is the function that needs to be included in your PHP script. The SendSMS function is the important part of the example.
The following example PHP script, sendsms.php, can be used to send an SMS text message via NowSMS with PHP.