PHP script for sending logo & ringtones
"Shridhar Raju" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Visual Quest India |
| Message-ID | <[email protected]> |
Hi, I don't know how to contribute to the Kannel project. I had been using these two scripts for sending Operator Logos & Ringing Tones. I thought, these scripts will useful for many members of the list, as many member query about logos & tones. So, I request co-ordinators of Kannel Project to review these scripts and do needful. If somebody guide me, regarding Group Logo & CLI logos, then I might do something for those scripts also. Shridhar Raju
sendrt.php
(application/octet-stream, 1.3 KB)
<html>
<head>
<title>Ringing Tone Sender</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
include("config.inc");
include("functions.inc");
if ($submit) {
$text = "%".ereg_replace("\r\n","%", chop(chunk_split($text, 2)));
echo "Sending the Ringing Tone to the phone \"$to\"...<br>\n";
$URL = "/cgi-bin/sendsms?username=".USERNAME."&password=".PASSWORD."&from=".GLOBAL_SENDER."&to=$to&udh=%06%05%04%15%81%00%00&text=$text";
http_send($URL,SENDSMS_PORT);
echo "<address><a href=\"$PHP_SELF\">Back to Send Ringing Tone</a></address>\n";
}
else {
?>
<h1>Ringing Tone Sender</h1>
<form name="sendsms" method="post" action="<?php echo "$PHP_SELF" ?>">
<p>Telephone number:<br>
<input type="text" size="30" name="to">
</p>
<p>Hexadecimal value (Without % delimiter):<br>
<textarea cols="20" rows="5" name="text" WRAP="PHYSICAL" ></textarea>
</p>
<p>
<input type="submit" value="Send Message" name="submit">
<input type="reset" value="Reset">
</p><br>
</form>
<?php
}
?>
<p></p>
<hr>
<table border="0" width="100%">
<tr>
<td width="50%"><address><a href="index.html">Back to admin</a></address></td>
<td width="50%" align="right"><address>Visit the Kannel homepage at <a href="http://www.kannel.org">www.kannel.org</a>.</address></td>
</tr>
</table>
</body>
</html>
sendol.php
(application/octet-stream, 1.6 KB)
<html>
<head>
<title>Operator Logo Sender</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
include("config.inc");
include("functions.inc");
if ($submit) {
$text = substr($mcc,1,1).substr($mcc,0,1)."F".substr($mcc,2,1).substr($mnc,1,1).substr($mnc,0,1).$text;
$text = "%".ereg_replace("\r\n","%", chop(chunk_split($text, 2)));
echo "Sending the Operator Logo to the phone \"$to\"...<br>\n";
$URL = "/cgi-bin/sendsms?username=".USERNAME."&password=".PASSWORD."&from=".GLOBAL_SENDER."&to=$to&udh=%06%05%04%15%82%00%00&text=$text";
http_send($URL,SENDSMS_PORT);
echo "<address><a href=\"$PHP_SELF\">Back to Send Operator Logo</a></address>\n";
}
else {
?>
<h1>Operator Logo Sender</h1>
<form name="sendsms" method="post" action="<?php echo "$PHP_SELF" ?>">
<p>Telephone number:<br>
<input type="text" size="30" name="to">
</p>
<p>MCC:
<input type="text" size="3" name="mcc"> MNC:
<input type="text" size="2" name="mnc">
</p>
<p>Hexadecimal value (Without % delimiter):<br>
<textarea cols="20" rows="5" name="text" WRAP="PHYSICAL" >
</textarea>
<p>
<input type="submit" value="Send Message" name="submit">
<input type="reset" value="Reset">
</p><br>
</form>
<?php
}
?>
<p></p>
<hr>
<table border="0" width="100%">
<tr>
<td width="50%"><address><a href="index.html">Back to admin</a></address>
</td>
<td width="50%" align="right"><address>Visit the Kannel homepage at <a href="http://www.kannel.org">www.kannel.org</a>.</address>
</td>
</tr>
</table>
</body>
</html>