Free Trial
Evaluate the service
for free
No Obligation - No Risk
Be up and running in minutes
Send Your First Text
NOW!

Pre-Pay Packages

  • Prices from just 6p
  • 50 - 2500 messages
  • Credits never expire
  • Replies are free
 

Monthly Packages

  • Prices from just 4.5p
  • 200 - 25000+ messages
  • No minimum contract
  • Replies are free






PHP SMS API

Sample Code

If you cut and paste the following code into a web page and access it with a web browser, then a text message will be sent. Note that you should replace <username>, <password> and <mobile number> with appropriate values.

Alternatively, here is a ZIP version of this code.

<html>
<body>
<?php
function sendTextMessage ($username, $password, $message, $destination) {

$host="https://www.totext.net/";
$path="selfcare/com/zipzaptext/selfcare/";
$action="SendMessagesApi.action";

$url = $host.$path.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);

$vars = array();
$vars["destination"]= $destination;
$vars["username"]= $username;
$vars["password"]= $password;
$vars["message"] = $message;

curl_setopt ($ch, CURLOPT_POSTFIELDS, $vars);
curl_exec ($ch);
curl_close ($ch);
}
?>

Test results:<br>
<?php
sendTextMessage ("<username>", "<password>", "Test from PHP", "<mobile number>");
?>

</body>
</html>

Having Problems

We're very keen that your integration should be straightforward and easy, so if you're having any trouble at all, then please don't hesitate to get in touch.