sclchina.com

How to Send a SMS Using PHP Script

17
    • 1). Open the text editor and a new blank document.

    • 2). Type "<?php" on the first line.

    • 3). Type "$api = 'http://APIurl';" on the next line. Substitute "APIURL" with the actual URL of your gateway.

    • 4). Type "$data['msg'] = 'YOUR MESSAGE HERE';" on the next line. Substitute 'YOUR MESSAGE HERE' for the actual message you want to send.

    • 5). Type "$data['username'] = 'YOURUSERNAME';" on the next line. Substitute 'YOURUSERNAME' for your username on the gateway.

    • 6). Type "$data['password'] = 'YOURPASSWORD';" on the next line. Substitute 'YOURPASSWORD' for your password for your gateway account.

    • 7). Type "$data['to'] = '##########';" on the next line. Substitute '##########' for the 10-digit phone of the destination cell phone.

    • 8). Type "$data['from'] = 'YOURNAME';" on the next line. Substitute 'YOURNAME' for who you want the message to be from. This can be any string.

    • 9). Type "$data['route'] = 'first';" on the next line.

    • 10

      Type "http_post_data( $api, $data);" on the last line.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.