Skip to content

Instantly share code, notes, and snippets.

@multitel
Created October 14, 2015 19:35
Show Gist options
  • Save multitel/461907c11bcd50da1857 to your computer and use it in GitHub Desktop.
Save multitel/461907c11bcd50da1857 to your computer and use it in GitHub Desktop.
Send SMS with new line testing
<?php
$server_url = "http://api.multitel.net/json/sendsms";
if(isset($_POST['submit'])) {
$data = array(
'UserName' => $_POST['username'],
'Password' => $_POST['password'],
'From' => $_POST['from'],
'To' => $_POST['to'],
'Text' => $_POST['text'],
);
$handle = curl_init($server_url);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
curl_exec($handle);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Send SMS test</title>
</head>
<body>
<form name="form1" method="post" action="">
Username : <input type="text" name="username" value="administrator" />
<br />
Password : <input type="text" name="password" value="password" />
<br />
From : <input type="text" name="from" value="" />
<br />
To : <input type="text" name="to" value="" />
<br />
text
<textarea name="text">test%0a123</textarea>
<br />
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment