function sendSMS($content) { $ch = curl_init('https://api.share-we.com/api-adv.php'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $content); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec ($ch); curl_close ($ch); return $output; } $username = 'USERNAME'; $password = 'PASSWORD'; $destination = '0400000000'; //Multiple numbers can be entered, separated by a comma $source = 'MyCompany'; $text = 'This is our test message.'; $ref = 'abc123'; $content = 'username='.rawurlencode($username). '&password='.rawurlencode($password). '&to='.rawurlencode($destination). '&from='.rawurlencode($source). '&message='.rawurlencode($text). '&ref='.rawurlencode($ref); $share_we_response = sendSMS($content); $response_lines = explode("\n", $share_we_response); foreach( $response_lines as $data_line){ $message_data = ""; $message_data = explode(':',$data_line); if($message_data[0] == "OK"){ echo "The message to ".$message_data[1]." was successful, with reference ".$message_data[2]."\n"; }elseif( $message_data[0] == "BAD" ){ echo "The message to ".$message_data[1]." was NOT successful. Reason: ".$message_data[2]."\n"; }elseif( $message_data[0] == "ERROR" ){ echo "There was an error with this request. Reason: ".$message_data[1]."\n"; } }
$to = $_GET["to"]; //The receiving mobile number $from = $_GET["from"]; //The sending mobile number $message = urldecode($_GET["message"]); //SMS content // You may wish to log this information in a database // Lets send an email with the message data $email_message = "Inbound SMS sent to $to.\nSent From: $from\nMessage: $message"; mail("email@example.com", "Inbound SMS", $message, "From: email@example.com");
$mobile = $_GET["to"]; //The receiving mobile number $ref = $_GET["ref"]; // Your reference number, if provided when sending $smsref = $_GET["smsref"]; // Reference number $status = $_GET["status"]; // Message status // You may wish to log this information in a database // Lets send an email with the updated data $message = "Status update for SMS sent to $mobile.\nOur reference: $ref\nShare We Reference: $smsref\nThe message status is now $status."; mail("email@example.com", "SMS Status Update", $message, "From: email@example.com");
function sendSMS($content) { $ch = curl_init('https://api.share-we.com/api-adv.php'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $content); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec ($ch); curl_close ($ch); return $output; } $username = 'USERNAME'; $password = 'PASSWORD'; $action = 'balance'; $content = 'username='.rawurlencode($username). '&password='.rawurlencode($password). '&action='.rawurlencode($action); $share_we_response = sendSMS($content); $share_we_response = explode(':', $share_we_response); if($share_we_response[0] == "OK"){ echo "Share We balance is ".$share_we_response[1]; }elseif( $share_we_response[0] == "ERROR" ){ echo "There was an error with this request. Reason: ".$share_we_response[1]."\n"; }
Build your own SMS integration by connecting your application to Share We using the HTTP protocol.
This full-featured API allows you to send and receive text messages, check credit balance, and get SMS delivery status. This API is ideal for sending bulk SMS as well as single messages.
All you’ll need is the ability to make an HTTPS or HTTP connection with our URL. Our API documentation contains all the required information, and our PHP SDK includes examples in PHP.
Use our lightweight API to send text messages over email easily. Many software packages with SMS capabilities can use the email-to-SMS gateway.
It’ll be as simple as using your contact’s phone number as the email address: [mobilenumber]@e2s.smsbroadcast.com.au — The first 160 characters will then get sent to your recipient as a text message.
You’ll just need to sign up to Share We and add your email address to your account settings. The API key itself is free of charge.
Add SMS functionality to a website for a bit of personalisation and interactivity. There are a few different reasons to use an SMS service:
Access to both APIs is included free when you set up your self-serve account. Plus, you’ll get full documentation to get you started with sending SMS to customers and staff.
Yes! You’ll have the option to reach out to our support staff if you need help implementing SMS into your software.
SMS credits cost as low as 3.7 cents each. Your first credit purchase will be 40% off, and they won’t expire, so it’s a good idea to stock up! Check out our pay-as-you-go pricing model here.
We deliver through onshore connections with Telstra, Optus and Vodafone without low-grade international routes.
You can sign up without needing to speak to a sales rep, which reduces our costs and allows us to offer you lower prices.
We have been around for a long time. Our team of SMS experts are happy to walk you through the ins and outs of SMS.