Welcome, Guest. Please Login or Register.
May 08, 2025, 10:33:56 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  SMS Message Gateway! « previous next »
Pages: [1] Reply Ignore Print
Author Topic: SMS Message Gateway!  (Read 412 times)
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
SMS Message Gateway!
« on: March 27, 2002, 05:07:31 AM »
Reply with quote

How about an SMS gateway that utilises ICQ-SMS or similar that way someone on the boards can sms a friend from the board etc.
Logged
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:SMS Message Gateway!
« Reply #1 on: March 27, 2002, 05:47:00 AM »
Reply with quote

got this along the way when i thought of the same idea...
//****************************************************************\\
//Config:

$uin="1234567"; //your ICQ number
$passw="1234567"; //your ICQpassword

$prefix="+44"; //sms prefix
$phonenumber="123456789"; //sms phone number
$message = "Hello!"; //sms message


//****************************************************************\\
// EN: calculate the content length

$contentlength= ( 37+
strlen($uin)+
strlen($passw)
);

//****************************************************************\\
// Openen van de inlogpagina
// EN: open loginpage

$htmlreply="";
$post ="POST http://web.icq.com/karma/dologin/1,,,00.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword,
*/*
Referer: http://web.icq.com/sms/login/1,,,00.html
Accept-Language: nl
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Host: web.icq.com
Content-Length: ".$contentlength."
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: uin=".$uin."; sms_country=".$prefix."; KarmaService1=Yes;
uin=".$uin."; sms_country=".$prefix."; KarmaService1=Yes

uService=1&uLogin=".$uin."&uPassword=".$passw."&x=0&y=0";

$remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);

global $remote;
global $post;
fputs($remote, $post);

while (!feof($remote)) { $htmlreply.=fgets($remote,120); }
//UNCOMMENT FOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";
fclose($remote);

//****************************************************************\\
//persoonlijke cookie uit de inlogpage halen
// EN: fetch personal cookie from login page

$splited = split("\n",$htmlreply);
$cookies = $splited[3];
$cookies = str_replace("Set-Cookie: KarmaLogin=","",$cookies);
$cookies = str_replace("; path=/","",$cookies);
$cookies = str_replace("\n","",$cookies);
//UNCOMMENT VOOR OUTPUT: echo $cookies;

if (strlen($prefix) == 2) { $contentprefix = ' '.$prefix; } else {
$contentprefix = $prefix; }
$charcount = (160-strlen($message));
$contentlength= ( 1561+
strlen($message)+
strlen($charcount)+
strlen($phonenumber)+
strlen($prefix)
);

//****************************************************************\\
//Verzendpagina openen met de opgehaalde cookie
// EN: open send page with fetched cookie

$htmlreply="";
$post ='POST http://web.icq.com/sms/send_history/1,,,00.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword,
*/*
Referer:
http://web.icq.com/sms/send_session/1,,,00.html?prefix=+'.$prefix.'&carrier=&tophone='.$phonenumber.'
Accept-Language: nl
Content-Type: multipart/form-data;
boundary=---------------------------7d12442eab4
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Host: web.icq.com
Content-Length: '.$contentlength.'
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: uin='.$uin.'; sms_country='.$prefix.'; KarmaService1=Yes;
KarmaLogin='.$cookies.'; uin='.$uin.'; sms_country='.$prefix.';
KarmaService1=Yes; KarmaLogin='.$cookies.'

-----------------------------7d12442eab4
Content-Disposition: form-data; name="carrier"


-----------------------------7d12442eab4
Content-Disposition: form-data; name="prefix"

'.$contentprefix.'
-----------------------------7d12442eab4
Content-Disposition: form-data; name="tophone"

'.$phonenumber.'
-----------------------------7d12442eab4
Content-Disposition: form-data; name="uSession"

1
-----------------------------7d12442eab4
Content-Disposition: form-data; name="uReply"


-----------------------------7d12442eab4
Content-Disposition: form-data; name="uLastId"


-----------------------------7d12442eab4
Content-Disposition: form-data; name="uSend"

1
-----------------------------7d12442eab4
Content-Disposition: form-data; name="uNextId"


-----------------------------7d12442eab4
Content-Disposition: form-data; name="uHistoryCounter"

1
-----------------------------7d12442eab4
Content-Disposition: form-data; name="count"

0
-----------------------------7d12442eab4
Content-Disposition: form-data; name="uSubmitCount"

0
-----------------------------7d12442eab4
Content-Disposition: form-data; name="checkNewMsg"

180000
-----------------------------7d12442eab4
Content-Disposition: form-data; name="charcount"

'.$charcount.'
-----------------------------7d12442eab4
Content-Disposition: form-data; name="msg"

'.$message.'
-----------------------------7d12442eab4
Content-Disposition: form-data; name="x"

30
-----------------------------7d12442eab4
Content-Disposition: form-data; name="y"

16
-----------------------------7d12442eab4--
';

$remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);

global $remote;
global $post;
fputs($remote, $post);

while (!feof($remote)) { $htmlreply.=fgets($remote,120); }
//UNCOMMENT FOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";
fclose($remote);

//****************************************************************\\
// check if message is send if send 'moved permanently' is returned if
(eregi('Moved Permanently',$htmlreply))

?>
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
Re:SMS Message Gateway!
« Reply #2 on: March 27, 2002, 05:56:37 AM »
Reply with quote

so does that work??? how do i install it...forgive my my PHP skills are pathetic!
Logged
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:SMS Message Gateway!
« Reply #3 on: March 27, 2002, 06:51:36 PM »
Reply with quote

no clue.. never tried it but i figure that it does work since they guy had it working on his site.  It is not a mod for yabbse (yet).  If you know php/yabb you can make it into a mod ;D
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
Re:SMS Message Gateway!
« Reply #4 on: March 28, 2002, 12:36:34 PM »
Reply with quote

to send sms via icq you just need a script that allows users to choose the country, carrier and add the number then allow for 160 characters in the message.

the format to send is easy....

just email the message to

+[countrycode][areacode][mobilenumber]@icqsms.com

im sure one of you legendary php'ers could build this quite easily
« Last Edit: March 28, 2002, 12:38:28 PM by Snowman30 » Logged
Coyote
YaBB God
*****
Posts: 702


I love YaBB SE!

Re:SMS Message Gateway!
« Reply #5 on: March 28, 2002, 03:41:29 PM »
Reply with quote

I have been thinking about this for a couple of weeks now, it would be a cool addon for the PM system to not only send a message to email, but sms as well.

Logged

To the world - you are just one person, but to one person you are the world!
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
Re:SMS Message Gateway!
« Reply #6 on: April 01, 2002, 11:39:55 AM »
Reply with quote

it sure would be....is there anyone who can build this for us all???
Logged
AndrewH
Noobie
*
Posts: 8


I'm a llama!

Re:SMS Message Gateway!
« Reply #7 on: April 01, 2002, 01:27:47 PM »
Reply with quote

Hey, that definitely is a pretty cool idea... sounds like a fun project. If only I had time... oh well, if anything comes up, I'll be sure to try it.
Logged
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
Re:SMS Message Gateway!
« Reply #8 on: April 03, 2002, 04:49:32 AM »
Reply with quote

Heres the java script to send an sms via icqsms via your email client such as Outlook

<script language="JavaScript">
<!--   
   function Send()
      {
      if(document.EmailSMS.cellNum.value==""){
         alert("Please Insert cellular phone#");
         return;
      }else{
         var num = (document.EmailSMS.cellNum.value)+"@icqsms.com";
         location.href='mailto:'+num;
      }
   }

      
      function CheckSMSbox() {
         if (document.sms_networks.phone.value.length > 0){
            var x = confirm("SMS me when when my provider is added to the available cellular networks")
            if (x == true) document.sms_networks.issms.checked = true;
         }
      }
      
      function Check() {
         if (document.sms_networks.provider.value == "") {
            alert("Please enter the name of your cellular provider");
            return false;
         }
         
         if (document.sms_networks.email.value.indexOf ('@',0) == -1 || document.sms_networks.email.value.indexOf ('.',0) == -1){
            alert("Please enter a valid email address.")
            return false;  
         }
         if (document.sms_networks.email.value == "") {
            alert("Please enter your email address");
            return false;
         }
         
         if (document.sms_networks.country.options[document.sms_networks.country.selectedIndex].text == "Select Country") {
            alert("Please select a country");
            return false;
         }
         
         if (document.sms_networks.issms.checked == true && document.sms_networks.phone.value == "") {
            alert("Please enter your cellular phone number");
            return false;
         }
         
         if(document.sms_networks.phone.value.length > 0){
            if(document.sms_networks.phone.value.length < 5 || document.sms_networks.phone.value.length > 20 || isNaN(parseInt(document.sms_networks.phone.value)) ){
               alert("Please fill in a valid phone#");
               return false;
            }
         }
         return true;
      }
            
      function remove_minus(str)
      {
        var i;
         var back = "";
   
        for (i = 0; i < str.length; ++i) {
            if (str.substring(i,i+1) != "-") {
               back += str.substring(i,i+1);
            }
         }
   
         return back;
      }
   
      function irc(popName) {
         var winName = "";
         
         winName = remove_minus(popName);
   
         if (document.frmLogin.nick.value != "") {
           if (document.frmLogin.icq.value != "") document.frmLogin.nick.value += "-"+document.frmLogin.icq.value;
         } else {
           if (document.frmLogin.icq.value != "") document.frmLogin.nick.value = "Guest-"+document.frmLogin.icq.value;
            else document.frmLogin.nick.value = "Guest";
         }
   
         if (document.frmLogin.info.value == "" && document.frmLogin.icq.value != "") document.frmLogin.info.value = document.frmLogin.icq.value+"@pager.icq.com";
   
         var url = "http://cgi.icq.com/cgi-bin/ircqnet/ircqnet.pl5?x=635&y=440&channel=" +popName+ "&nick=" +document.frmLogin.nick.value+ "&info=" +document.frmLogin.info.value;
         window.open(url, winName, 'toolbar=false,directories=false,status=false,menubar=0,scrollbars=0,resizable=0,width=640,height=480, replace=yes');
      }
      
//  End -->

</script>


and heres a basic html page to call it

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
</head>

<body>

<font face="Arial" size="-1"><!--webbot bot="HTMLMarkup" startspan --><script language="JavaScript">
<!--   
   function Send()
      {
      if(document.EmailSMS.cellNum.value==""){
         alert("Please Insert cellular phone#");
         return;
      }else{
         var num = (document.EmailSMS.cellNum.value)+"@icqsms.com";
         location.href='mailto:'+num;
      }
   }

      
      function CheckSMSbox() {
         if (document.sms_networks.phone.value.length > 0){
            var x = confirm("SMS me when when my provider is added to the available cellular networks")
            if (x == true) document.sms_networks.issms.checked = true;
         }
      }
      
      function Check() {
         if (document.sms_networks.provider.value == "") {
            alert("Please enter the name of your cellular provider");
            return false;
         }
         
         if (document.sms_networks.email.value.indexOf ('@',0) == -1 || document.sms_networks.email.value.indexOf ('.',0) == -1){
            alert("Please enter a valid email address.")
            return false;  
         }
         if (document.sms_networks.email.value == "") {
            alert("Please enter your email address");
            return false;
         }
         
         if (document.sms_networks.country.options[document.sms_networks.country.selectedIndex].text == "Select Country") {
            alert("Please select a country");
            return false;
         }
         
         if (document.sms_networks.issms.checked == true && document.sms_networks.phone.value == "") {
            alert("Please enter your cellular phone number");
            return false;
         }
         
         if(document.sms_networks.phone.value.length > 0){
            if(document.sms_networks.phone.value.length < 5 || document.sms_networks.phone.value.length > 20 || isNaN(parseInt(document.sms_networks.phone.value)) ){
               alert("Please fill in a valid phone#");
               return false;
            }
         }
         return true;
      }
            
      function remove_minus(str)
      {
        var i;
         var back = "";
   
        for (i = 0; i < str.length; ++i) {
            if (str.substring(i,i+1) != "-") {
               back += str.substring(i,i+1);
            }
         }
   
         return back;
      }
   
      function irc(popName) {
         var winName = "";
         
         winName = remove_minus(popName);
   
         if (document.frmLogin.nick.value != "") {
           if (document.frmLogin.icq.value != "") document.frmLogin.nick.value += "-"+document.frmLogin.icq.value;
         } else {
           if (document.frmLogin.icq.value != "") document.frmLogin.nick.value = "Guest-"+document.frmLogin.icq.value;
            else document.frmLogin.nick.value = "Guest";
         }
   
         if (document.frmLogin.info.value == "" && document.frmLogin.icq.value != "") document.frmLogin.info.value = document.frmLogin.icq.value+"@pager.icq.com";
   
         var url = "http://cgi.icq.com/cgi-bin/ircqnet/ircqnet.pl5?x=635&y=440&channel=" +popName+ "&nick=" +document.frmLogin.nick.value+ "&info=" +document.frmLogin.info.value;
         window.open(url, winName, 'toolbar=false,directories=false,status=false,menubar=0,scrollbars=0,resizable=0,width=640,height=480, replace=yes');
      }
      
//  End -->

</script>
<!--webbot bot="HTMLMarkup" endspan -->
<br>
<center>
<table border="0" cellspacing="0" cellpadding="0" width="400">
  <tr>
    <td bgcolor="#381397" colspan="4"><img src="/images/empty.gif" width="1" height="1" border="0" alt></td>
  </tr>
  <tr>
    <td bgcolor="#381397" width="1" rowspan="2"><img src="/images/empty.gif" width="1" height="1" border="0" alt></td>
    <td width="1" bgcolor="#381397"><img src="/images/empty.gif" width="5" height="1" border="0" alt></td>
    <td valign="middle" colspan="2" bgcolor="#381397" align="center"><font face="arial" size="-1" color="white"><b>Send
      an SMS via Email</b></font></td>
    <td bgcolor="#381397" width="1" rowspan="2"><img src="/images/empty.gif" width="1" height="1" border="0" alt></td>
  </tr>
  <tr bgcolor="#F5F7FB">
    <td>&nbsp;</td>
    <td valign="top" align="center" width="392">
      <form name="EmailSMS" onsubmit="return false; Send()">
        <font face="ms sans serif" size="-2"><br>
        Enter a cellular phone#:<br>
        <input type="text" name="cellNum" size="20"><br>
        <a href="javascript:Send()"><img height="15" alt="Send SMS via Email" src="http://www.icq.com/images/sms/revised/via_email.gif" width="156" vspace="2" border="0"></a><br>
        </font>
      </form>
    </td>
  </tr>
  <tr>
    <td bgcolor="#6B55DE" colspan="4"><img src="/images/empty.gif" width="1" height="1" border="0" alt></td>
  </tr>
</table>
<br>
</font></center>

</body>

</html>

now if anyone is willing to have a look at this and make a addon for Yabb i think a lot of people would be happy?
Logged
Dic
Noobie
*
Posts: 44


Re:SMS Message Gateway!
« Reply #9 on: April 03, 2002, 06:24:28 AM »
Reply with quote

did u try the form?
does not work for me
Logged
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
Re:SMS Message Gateway!
« Reply #10 on: April 03, 2002, 11:57:26 AM »
Reply with quote

did you incorporate the script within the html page???
Logged
Snowman30
Jr. Member
**
Posts: 67


ICQ - 10739583 WWW
Re:SMS Message Gateway!
« Reply #11 on: December 22, 2002, 12:20:02 AM »
Reply with quote

Has nayone had any success with creating a mod that uses the SMS feature of ICQ?

Im really interested in it but havent had the time to look through the code to see if it can be done.
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  SMS Message Gateway! « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.175 seconds with 21 queries.