Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SMS & Delphi 5

Posted on 2000-04-26
17
Medium Priority
?
1,077 Views
Last Modified: 2008-02-20
Hi all,

Has anyone done anything with SMS before using Delphi?  I need to write something which sends a message using SMS.  The carrier we are using has a local dial-in number, you send the message, then hang up.

Any ideas or components which could help me with this?  Some code would be very nice :)

Cheers,

Stuart.
0
Comment
Question by:Stuart_Johnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +6
17 Comments
 
LVL 3

Expert Comment

by:shenqw
ID: 2754034
listen
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 2754573
yes, a very simple solution:

enter the courires web page and see exactly what it is doing when you send the sms message, meaning ,the sms sending is done by an exe file on the carrier's server, so when you send messages through the carrier you just give the .exe file the command line arguments and the file's doing the rest.
 
so,very simple , view the source code in the web page, and do exactly as they are doing (only in your application):
a)you sould expect an asp page: to open the asp page, couple of steps maximum:
go into the web site, after it's fully loaded, choose the view|source from the menu, if it's a long page and it has conditions and stuff in it thn bingo if not, look for an .asp page in it, and load the address in your browser::
if you see a line like this
<FRAME MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=auto SRC="http://www..../..../send_message_form.asp" name="out">

the load in the address edit box in the browser the address of the asp page : http://www...../.../send_message_form.asp

now you have the code ,(even if your not fammiliar with asp it's very easy to understand), implement the same code in a delphi application , add the TClientSocket to your application ,in it's host propery enter the web's address( the http address/ or the asp address , you should check), and that's all

hope i helped

enjoy....




0
 
LVL 2

Accepted Solution

by:
mullet_attack earned 400 total points
ID: 2755298
Our local Telco has a dial-in number that you access via a terminal session (eg Hyper terminal). Is this how your carrier implements their dialin? If so, I have a component that does the job. If not, some more details on how you use your carrier's dial-in service please.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:Aleq
ID: 2756721
listening
0
 
LVL 17

Expert Comment

by:inthe
ID: 2756974
these are all i ever seen that could be used in delphi though are not cheap :-(

http://www.derdack.com/products/developer.html

The Message Master Developer Suite offers two separate powerful components for wireless messaging, one for sending alphanumeric messages to mobile phones or pagers per modem or ISDN connections and one for sending AND receiving messages with PC connected GSM phones (serial or infrared).
 
Both components integrate three technologies:
(1) Microsoft's latest component technology COM (Component Object Model) enables you to build contemporary software components
(2) Full ActiveX controls and can even be used within HTML pages (client-sided)
(3) Windows Win32 Dynamic Link Libraries (DLL)
You have the choice!
blah blah ...

cheers Barry
 
0
 
LVL 6

Author Comment

by:Stuart_Johnson
ID: 2757475
tomer_engel: unfortunately I can't see this solving my problem.  As I said, I need it to dial into our carrier, not using the net.  Thanks anyway for the input.

mullet_attack: Could you either give me a link to this component, or email it too me at enigma@nlc.net.au?  Thanks, I'll definately take a look at it.

And Barry.  How are you?  I haven't been around much lately.  Just started a new job and I'm still trying to get a feel for the place.  It's weird working somewhere new after 3 years at the same place.

I like what you have shown here.  I'll take a look at the web site mentioned later today (during lunch) and get back too you.  I'm not sure what sort of a budget we have to do this, so if it's too expensive, it may not be a viable option.

Thanks all so far.  Keep the ideas rolling!


Stu.
0
 
LVL 6

Author Comment

by:Stuart_Johnson
ID: 2767544
Hi Barry.

Unfortunately, the components where a little on the expensive side - especially for a simple job like this.  Thanks anyway.

Stu.
0
 
LVL 6

Author Comment

by:Stuart_Johnson
ID: 2767546
mullet_attack.  I got your component and forwarded it onto the guy doing the job.  He seems to think it will do the job perfectly.  Thanks very much!

Stu.
0
 

Expert Comment

by:hakanb
ID: 2874392
Hi Stuart,

Gone thru the comments & answers of your question and I am also interested in the component you have received from mullet_attack. Could you send it to me?
hakanb@intermat.com.tr
Thanks.
0
 
LVL 2

Expert Comment

by:mullet_attack
ID: 2875579
Perhaps you should ask Mullet_Attack, after all, he does own the copyright...
0
 

Expert Comment

by:hakanb
ID: 2879433
Sorry Mullet_Attack, my mistake.

I should have asked you in the first place. Could you please send me the component?

Thanks.
Hakan
hakanb@intermat.com.tr
0
 
LVL 2

Expert Comment

by:mullet_attack
ID: 2879756
done.
0
 

Expert Comment

by:yarasa
ID: 3906942
Hello mullet_attack did you done a sms software? If yes can you please send it's source or the component you used?
yarasa@yarasa.org
Thanks.
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 3944553
hello mullet_atack--I'll join the gang and ask you send thesource code too,please.

THANX
Tomer      Tomer_engel@hotmail.com
0
 
LVL 2

Expert Comment

by:mullet_attack
ID: 3949576
Hi Tomer,

The SMS component in question was a simple solution that works for me. My Telco has a dial-in terminal session, and the component simply responds to the text prompts. It also uses a 3rd party Comms library, Asynch Pro for Delphi, so unless you own that, and your Telco works the same way, the component will not work for you. However, my ideas may be of interest or value, so you are welcome to the source

BTW, if anyone makes a billion dollars from this, I'd like a small 0.001% please :-)

-----------------------------
unit SMS;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  AdPort, AdSModem, AdTapi, AdPacket;

type
  TSMS = class(TComponent)
  private
    fPhone1 : string;
    fPhone2 : string;
    fPhone3 : string;
    fMessage1 : string;
    fMessage2 : string;
    fMessage3 : string;
    fApdComport : TApdComport;
    fApdTapiDevice : TApdTapiDevice;
    fApdDataPacket: TApdDataPacket;
    MessageNum : integer;
  protected
    procedure GotStringPacket(Sender: TObject; Data: String);
    procedure SetApdDataPacket(value : TApdDataPacket);
  public
    procedure Dial;
    { Public declarations }
  published
    property Phone1 : string read fPhone1 write fPhone1;
    property Phone2 : string read fPhone2 write fPhone2;
    property Phone3 : string read fPhone3 write fPhone3;
    property Message1 : string read fMessage1 write fMessage1;
    property Message2 : string read fMessage2 write fMessage2;
    property Message3 : string read fMessage3 write fMessage3;
    property ApdComport : TApdComport read fApdComport write fApdComport;
    property ApdTapiDevice : TApdTapiDevice read fApdTapiDevice write fApdTapiDevice;
    property ApdDataPacket : TApdDataPacket read fApdDataPacket write SetApdDataPacket;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Planetech', [TSMS]);
end;

{ TSMS }

procedure TSMS.Dial;
begin
  if ((fApdTapiDevice <> nil) and (ApdComport <>nil) and (fApdDataPacket <> nil)) then
    begin
      fApdDataPacket.OnStringPacket := GotStringPacket;
      MessageNum := 1;
      TApdTapiDevice(fApdTapiDevice).Dial('0418707767');
    end;
end;

procedure TSMS.GotStringPacket(Sender: TObject; Data: String);
begin
  inherited;
  if Pos('JUST RETURN TO QUIT',Data)>0 then
    begin
      case MessageNum of
        1:
          begin
            if Phone1 <> '' then
              Apdcomport.PutString(Phone1);
          end;
        2:
          begin
            if Phone2 <> '' then
              Apdcomport.PutString(Phone2);
          end;
        3:
          begin
            if Phone3 <> '' then
              Apdcomport.PutString(Phone3);
          end;
      end;
      Apdcomport.PutChar(#13);
    end
  else
  if Pos('ENTER MESSAGE',Data)>0 then
    begin
      case MessageNum of
        1:
          begin
            if Message1 <> '' then
              Apdcomport.PutString(Message1);
          end;
        2:
          begin
            if Message2 <> '' then
              Apdcomport.PutString(Message2);
          end;
        3:
          begin
            if Message3 <> '' then
              Apdcomport.PutString(Message3);
          end;
       end;
      Apdcomport.PutChar(#13);
      Inc(messageNum);
    end
  else
  if Pos('THANK YOU',Data)>0 then
    APDTapiDevice.Cancelcall;

end;

procedure TSMS.SetApdDataPacket(value: TApdDataPacket);
begin
  if value <> nil then
    fApdDataPacket := value
  else
   fApdDataPacket := nil;
end;

end.
0
 

Expert Comment

by:lingxin
ID: 4441080
mullet_attack :
HELLO!
AdPort, AdSModem, AdTapi, AdPacket;
i don't find these dcu file.
i can give you 100 points for you email
me .
os@8848.net
0
 
LVL 2

Expert Comment

by:mullet_attack
ID: 4454743
"It also uses a 3rd party Comms library, Asynch Pro for Delphi, so unless you own that..."


I don't think 100 points would excuse piracy. You need to either buy this product, or adapt my simple code to use a freeware comms library.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question