Free Sms Script

Started on the old forum in May 2008 · view the original in the archive · old links redirect here

10 replies · 2,047 views · started 18 years ago · 1 min read

5 participants
WhiteWarrior Principal · 1,419 posts #1

You will need to create the forms in this... this is just a code to send the SMS!

If you do the forms to it, please post them here! not got time to make them

CODE$user_agent = "Mozilla/5.0 Galeon/1.2.6 (Linux i686; U;) Gecko"; echo 'sending'; function post_it($datastream, $url) { $url = preg_replace('@^http://@i', '', $url); $host = substr($url, 0, strpos($url, '/')); $uri = strstr($url, '/'); $reqbody = ''; foreach ($datastream as $key => $val) { if (!empty($reqbody)) { $reqbody .= '&'; } $reqbody .= $key . '=' . urlencode($val); } $socket = fsockopen($host, 80, $errno, $errstr, 5); if (!$socket) { $result['errno'] = $errno; $result['errstr'] = $errstr; return $result; } else { $contentlength = strlen($reqbody); $reqheader = "POST $uri HTTP/1.1\r\n" . "Host: $host\nUser-Agent: $user_agent\r\n" . "Content-Type: application/x-www-form-urlencoded\r\n" . "Content-Length: $contentlength\r\n\r\n" . "$reqbody\r\n"; fputs($socket, $reqheader); if ($_GET['result'] == '1') { while (!feof($socket)) { $result[] = fgets($socket, 512); } } fclose($socket); return $result; } } $from = $_GET['from']; $to = $_GET['to']; $subject = urldecode($_GET['subject']); $message = urldecode($_GET['message']); if ($_GET['network'] == 't-mobile') { $data['txtNum'] = $to; $data['txtFrom'] = $from; $data['txtMessage'] = $message; $data['hdnpublic'] = '1'; $data['msgTermsUse'] = 'on'; $result = post_it($data, 'http://www.t-mobile.com/messaging/default.asp'); } elseif ($_GET['network'] == 'att') { $data['pin'] = $to; $data['from'] = $from; $data['subject'] = $subject; $data['message'] = $message; $result = post_it($data, 'http://www.mobile.att.net/messagecenter/pagersend.cgi'); } elseif ($_GET['network'] == 'uscc') { $data['number'] = $to; $data['message'] = $message; $result = post_it($data, 'http://66.77.16.246/index.php'); } elseif ($_GET['network'] == 'cingular') { $data['TO'] = $to; $data['FROM'] = $from; // Can be a number or e-mail address $data['MESSAGE'] = $message; $data['SUBJECT'] = $subject; $result = get_it($data, 'http://208.62.68.135/msgresult.shtml'); } elseif ($_GET['network'] == 'pl.idea') { // The is a hidden value generated by the server. It is 'token' $fp = fopen('http://sms.idea.pl/', 'r'); while (!feof($fp)) { $rip .= fgets($fp, 1024); } fclose($fp); eregi('([0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12})', $rip, $match); $data['token'] = $match; $data['RECIPIENT'] = $to; $data['SENDER'] = $from; // First and last name $data['SHORT_MESSAGE'] = $message; $data['CHK_RESP'] = 'on'; $data['respInfo'] = '2'; $result = get_it($data, 'http://sms.idea.pl/sendsms.aspx'); } if (isset ($result['errno'])) { $errno = $result['errno']; $errstr = $result['errstr']; echo "Error $errno $errstr"; exit; } else { for ($i = 0; $i< count($result); $i++) { echo $result[$i]; } } ?>

subzero Super moderator Fellow · 3,954 posts #2

i have ever seen this work before and i think it wont lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #4

do it work ?

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

learner Lead · 587 posts #6

this one is best

first create a index.html

<html>
 <body>
   <h1>My SMS form</h1>
   <form method=post action='sendsms.php'>
   <table border=0>
   <tr>
     <td>Recipient</td>
     <td><input type='text' name='recipient'></td>
   </tr>
   <tr>
     <td>Message</td>
     <td><textarea rows=4 cols=40 name='message'></textarea></td>
   </tr>
   <tr>
     <td> </td>
     <td><input type=submit name=submit value=Send></td>
   </tr>
   </table>
   </form>
 </body>
</html>

then sendsms.php

<?php

########################################################
# Login information for the SMS Gateway
########################################################

$ozeki_user = "admin";
$ozeki_password = "abc123";
$ozeki_url = "http://127.0.0.1:9501/ozeki?";

########################################################
# Function used to send the SMS message
########################################################

function ozekiSend($phone, $msg){
      global $ozeki_user,$ozeki_password,$ozeki_url;

      $url = 'username='.$ozeki_user;
      $url.= '&password='.$ozeki_password;
      $url.= '&action=sendMessage';
      $url.= '&messageType=SMS:TEXT';
      $url.= '&recipient='.urlencode($phone);
      $url.= '&messageData='.urlencode($msg);

      $urltouse =  $ozeki_url.$url;

      //Open the URL to send the message
      $resp = file($urltouse);

      echo join("\r\n",$resp);
}

########################################################
# GET data from sendsms.html
########################################################

$phonenum = $_POST['recipient'];
$message = $_POST['message'];

ozekiSend($phonenum,$message);
?>

final setp find out some sms sending gateway and make the changes thats as simple as that

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

darkdesire Senior · 250 posts #9

tried it but no idea how to configure the gateway, anyone know how to do this (in simple terms pls)

:p:p:p

learner Lead · 587 posts #10

here you go mate

Introduction

    The Kannel Open Source WAP and SMS gateway works as both an SMS
    gateway, for implementing keyword based services via GSM text
    messages, and a WAP gateway, via UDP. The SMS part is fairly
    mature, the WAP part is early in its development. In this release,
    the GET request for WML pages and WMLScript files via HTTP works,
    including compilation for WML and WMLScript to binary forms. Only
    the data call bearer (UDP) is supported, not SMS.
    
Requirements

    You need a Unix-like operating system that supports POSIX threads
    (pthreads.h). We use RedHat Linux and Debian GNU/Linux systems.

    There is also support for the Cygwin 1.3 POSIX emulation layer
    for the Win32 platforms.
    
    You need GNU make, other make's tend not to work. For example,
    the FreeBSD and Solaris versions of make do not work. Check the
    version of your make with "make --version"; if it does not reply
    with "GNU Make version x.y.z", then it is not GNU make.
    
    On Solaris, you probably want to install gcc, GNU make and GNU
    binutils from [url]www.sunfreeware.com[/url].
    
    On MacOS X, you may have problems in compiling the latest libxml
    (2.4.23). There may be linking errors for those library. A work-
    arround is either using an older version of libxml (2.3.9 for 
    example) or to build it as static library without the dynamic one 
    being built.

Documentation

    The user manual is in the doc/userguide directory and although it
    is not complete, explain almost all parts of Kannel. Developer
    documentation (currently very outdated) is in the doc/arch
    directory.
    
    In order to convert the documentation from DocBook (a markup
    language) to HTML and PostScript, you need some tools. On a
    Debian GNU/Linux system, install the package "docbook-stylesheets"
    and everything it depends on:
    
        apt-get install docbook-stylesheets
    
        On a Red Hat Linux system, you need to install the following
    packages, in order:
    
        sgml-common
        psgml
        docbook
        stylesheets
        jade
        jadetex
        transfig

        See [url]http://www.rpmfind.net[/url] to find the packages.

        On a Gentoo system, the following should do:

        emerge transfig jadetex docbook-dsssl-stylesheets

        On a Mandrakelinux system, the following should do:

        urpmi transfig jadetex docbook-style-dsssl

    Then apply this change to /usr/share/texmf/web2c/texmf.cnf:
    
        hash_extra.jadetex = 15000
        hash_extra.pdfjadetex = 15000
        pool_size.jadetex = 500000
        pool_size.pdfjadetex = 500000
        string_vacancies.jadetex = 45000
        string_vacancies.pdfjadetex = 45000
        max_strings.jadetex = 55000
        max_strings.pdfjadetex = 55000
        pool_free.jadetex = 47500
        pool_free.pdfjadetex = 47500
        nest_size.jadetex = 500
        nest_size.pdfjadetex = 500
        param_size.jadetex = 1500
        param_size.pdfjadetex = 1500
        save_size.jadetex = 5000
        save_size.pdfjadetex = 5000
        stack_size.jadetex = 1500
        stack_size.pdfjadetex = 1500
    
        On other systems, you'll have to figure it out yourself.
    
Getting the gateway sources

    You can download the sources from
    [url]http://www.kannel.org/download.shtml[/url].
    
    Note that you also need the Gnome-xml library from
    [url]http://xmlsoft.org/xml.html[/url]. That one probably requires zlib,
    depending on how it is configured. You need at least version
    2.2.0

Compiling and installing the gateway

    See the file INSTALL for generic installation instructions.
    The short form:
    
        ./configure
        touch .depend
        make depend
        make
        make bindir=/somewhere/suitable install

    See the User Guide (doc/userguide/ or
    [url]http://www.kannel.org/userguide.shtml[/url]) for Kannel specific
    options to configure.

For developers only: autoconf, configure, config.status, and Makefile

    We use the GNU autoconf tool to make it easier to adapt Kannel to
    each platform. The `autoconf' program reads the file configure.in,
    and generates a corresponding shell script called configure,
    which investigates the system it runs on to see what it supports
    and what it does not. configure then reads Makefile.in and
    config.h.in and writes out Makefile, config.h, and a shell
    script config.status.
    
    If you modify configure.in, you need to run autoconf.
    
    If you modify Makefile.in or config.h.in, you need to run
    config.status.
    
    If you modify any source files to add or change any header
    includes, you need to run "make depend".
    
    You always need to run "make" (which is the same as "make all").
    
    If you have trouble building things and suspect that there is a
    problem with the Makefile, run "make clean all". If that solves
    it, report it as a bug (see the end of this README).

For developers only: adding new SMS Center protocol support

    As Kannel does not support all the SMSC protocols that exists,
    it might become necessary to add new kind of protocols, 
    including support to use mobile phones as SMSCes.

    When doing this, read interface specification in gw/smscconn_p.h.
    Drivers should stick to these rules as good as they can.

For developers only: "make check"

    The Kannel Makefile contains a target called "check", which
    is used to run a series of automatic, non-interactive tests on
    various subsystems. 
    
    Each test program MUST stored in the `checks' subdirectory. Each
    test MUST be written either as a C program named `check_*.c'
    or a Bourne shell script named `check_*.sh'. The C programs are
    compiled by the Makefile, the shell scripts MUST be executable.

    The test programs MUST output nothing to stdout, and MUST use a
    zero exit code to indicate that the test was successful, and a
    non-zero exit code to indicate a failure of the test. This way,
    if one runs "make -s check", one can easily see which tests are
    run and which tests work.
    
    The test programs MUST output error messages to stderr and they
    MUST mention which test program and which subtest failed. In
    case of failure, they may leave log files or other auxiliary
    files, and these MUST be listed in the error messages to stderr,
    so that the user has a reasonable way to diagnose the error.
    The Makefile captures the stderr output to `check.log'.

    The tests SHOULD take a reasonable time, preferably less than
    fifteen seconds each. This way, one can run "make -s check"
    before each commit. If there is a need to run longer tests,
    then the tests need to be divided into fast and slow ones.
    
    These tests are meant to test whether subsystems mostly work,
    stress testing needs to be done separately, and tends to require
    testing against real applications.

For developers only: Source tree organization

    The source tree is organized as follows:
    
        gateway        root of source tree: some docs, no sources
        |-- contrib    contributed extra material
        |-- doc        documentation
        |-- gw        the gateway itself
        |-- gwlib    utility functions
        |-- test    programs for testing the gateway
        `-- utils    utility programs

For developers only: WMLScript references

    WMLScript Specification
              Wireless Application Protocol WMLScript Language
              Specification Version 1.1 [url]http://www.wapforum.org/[/url]

    WMLScript Standard Libraries Specification
              Wireless Aplication Protocol WMLScript
              Standard Libraries Specification Version 1.1
              [url]http://www.wapforum.org/[/url]

    RFC-2279    UTF-8, a transformation format of ISO 10646

    rfc/iana/assignments/character-sets
              The official names for character sets that may
              be used in the Internet and may be referred to in
              Internet Documentation.

    ANSI/IEEE Std 754-1985
              IEEE Standard for Binary Floating-Point Arithmetic.
              Institute of Electrical and Electronics Engineers,
              New York (1985).

Configuring and running the gateway

    See the user guide in doc/userguide or on the web at
    [url]http://www.kannel.org/doc.shtml[/url].
    
    For test use, you can see sample configurations
    gw/smskannel.conf (SMS gateway) and gw/wapkannel.conf (WAP gateway).

Using the gateway with a Nokia 7110

    To configure a Nokia 7110 to use the gateway, fill in the
    following (note that you need to provide your own dialup
    line):
    
        Home page: [url]http://www.kannel.org/wap/hello.wml[/url]
        (or any other WML page)
        Connection type: continuous
        Connection security: off
        Bearer: data
        Dial-up number: <your dialup line>
        IP address: <IP number of the host running bearer box>
        Authentication type: normal
        Data call type: <analog or isdn, depending on your line>
        Data call speed: 9600
        User name: <username for your dialup line>
        Password: <password for your dialup line>
        
    After you have modified the profile, activate it and load the
    home page. If you use the sample page above, you should see
    "hello, world" on the screen after a few moments.

Modifications to old Kannel (0.8 and older)

    After release 0.8 Kannel architecture has been modified
    considerably, resulting changes in basic running of the standard
    WAP or WAP gateway.

    In new design, there is only one configuration file (to be more
    exact, you can have several of them, one for each kind of box,
    but that is advanced feature, which is not very usable) for
    bearerbox, smsboxes and wapboxes. Details of that file is in
    doc/userguide/newconf.txt.  As a quick reference, you just put
    all your old configuration files into same file, remove some
    rows and add 'group = xxx' variables into it.

    Moreover, there is no internal smsbox in new Kannel. So, when
    running SMS services you MUST run separate smsbox. This is most
    easily done with Kannel as daemon, launched with init.d. See
    utils/ directory for any supplied systems.

Feedback and more information

    You may want to subscribe the announce and devel lists at
    [url]www.kannel.org[/url]. If you need help or want to participate in the 
        development of Kannel. Send e-mail to
    
        announce-subscribe@kannel.org
        devel-subscribe@kannel.org

    (You'll get further instructions via automatic reply mails.)

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

darkdesire Senior · 250 posts #11

ta learner but i got that bit, its the config bit i cant work out, the settings already in it dont work, the bit below is the bit i need info on

$ozeki_user = "admin"; $ozeki_password = "abc123"; $ozeki_url = "http://127.0.0.1:9501/ozeki?";

:p:p:p

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close