Solved

SMS & Delphi 5

Posted on 2000-04-26
17
1,043 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
  • 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 100 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
 

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now