Filename: icarus_sms.php
<?PHP
include("config.php");
function send_sms($message)
{ global $smsnum;
$sizebox = mb_strlen($message);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://216.129.53.44:8080/cgi-bin/send_sm_rogers.new");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "msisdn=$smsnum&text=$message&SIZEBOX=$sizebox");
curl_exec($ch);
curl_close($ch);
echo "Your SMS message has been sent.\n";
}
echo "<html>\n";
echo "<head>\n";
echo "<title>Send me an SMS!</title>\n";
echo "</head>\n";
echo "<body>\n";
echo "<h2>Send an SMS message to Icarus' cell phone!</h2>\n";
if ( $submit )
{ echo "
\n";
if ( $message )
{ send_sms($message);
unset($message);
}
else
{ echo "You must enter a message!\n"; }
}
echo "<form method=\"post\" action=\"icarus_sms.php\">\n";
echo "
Enter your message here:
\n";
echo "<textarea name=\"message\" rows=3 cols=50></textarea>
\n";
echo "Only the first 160 characters will be transmitted!\n";
echo "
<input type=\"submit\" name=\"submit\" value=\"SEND\">\n";
echo "</form>\n";
echo "</body>\n";
echo "</html>\n";
?>