Utilizamos cookies propias y de terceros. [Más información sobre las cookies].
Política de cookies
Proyecto AjpdSoft

· Inicio
· Buscar
· Contactar
· Cookies
· Descargas
· Foros
· Historia
· Nosotros
· Temas
· Top 10
· Trucos
· Tutoriales
· Wiki
Proyecto AjpdSoft: Foros

AjpdSoft :: Ver tema - ENVIAR SMS DESDE DELPHI
Foros de discusión Buscar Perfil FAQ Iniciar sesión
Information ENVIAR SMS DESDE DELPHI

Publicar nuevo tema Responder al tema
Foros de discusión » Borland Delphi, Codegear Delphi .Net   
Ver tema anterior :: Ver tema siguiente
AutorMensaje
webmasterplc
Excelente usuario


Registrado: Oct 31, 2009
Mensajes: 26

Asunto: ENVIAR SMS DESDE DELPHI Responder citando

HOLA NECESITO ENVIAR SMS DESDE DELPHI A TRAVEZ DE UN GATEWAY LA DIRECCION DEL GATEWAY ES
http://DIRECCIONDELGATEAWAY.net/?phonenumber=04248225809&mensaje=MENSAJE DE PRUEBA&user=bert&password=theg
QUIERO HACERLO DESDE DELPHI
LOS DATOS QUE DEBO PASAR PARA CONCATENAR LA DIRECCION ES
PHONENUMBER: NUMERO DE CELULAR
MENSAJE:ES EL TEXTO
USER: USUARIO QUE ME ASIGNAN
PASSWORD: LA CLAVE QUE ME DAN
ALGUIEN ME PUEDE AYUDAR Y LIBERAMOS LA APLICACION

[/url]
MensajePublicado:
Dom Dic 26, 2010 8:25 pm
Top of PageVer perfil de usuario
alonsojpd
Administrador/Moderador


Registrado: Sep 16, 2003
Mensajes: 2687

Asunto: Re: ENVIAR SMS DESDE DELPHI Responder citando



Anuncios



webmasterplc escribió:
HOLA NECESITO ENVIAR SMS DESDE DELPHI A TRAVEZ DE UN GATEWAY LA DIRECCION DEL GATEWAY ES
http://DIRECCIONDELGATEAWAY.net/?phonenumber=04248225809&mensaje=MENSAJE DE PRUEBA&user=bert&password=theg
QUIERO HACERLO DESDE DELPHI
LOS DATOS QUE DEBO PASAR PARA CONCATENAR LA DIRECCION ES
PHONENUMBER: NUMERO DE CELULAR
MENSAJE:ES EL TEXTO
USER: USUARIO QUE ME ASIGNAN
PASSWORD: LA CLAVE QUE ME DAN
ALGUIEN ME PUEDE AYUDAR Y LIBERAMOS LA APLICACION

[/url]


A continuación te pasamos el código de cómo acceder a una URL y obtener lo que devuelva, o bien en texto o bien en una ventana de navegador.

No está terminado del todo, en breve pondremos la descarga disponible, pero tal vez esto te sirva:

Código:

unit UnidadEnvioSMS;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes,
  Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, shellapi, IdHTTP,
  ComCtrls, OleCtrls, SHDocVw;

type
  TformEnvioSMS = class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    txtUsuario: TEdit;
    txtPassword: TEdit;
    Label2: TLabel;
    GroupBox2: TGroupBox;
    txtNumeroMovil: TComboBox;
    Label3: TLabel;
    txtMensaje: TMemo;
    Label4: TLabel;
    Label5: TLabel;
    txtURL: TEdit;
    lInfo: TLabel;
    Label6: TLabel;
    txtNumCaracteres: TEdit;
    GroupBox3: TGroupBox;
    LWEB: TLabel;
    GroupBox4: TGroupBox;
    txtURLFinal: TEdit;
    btEnviar: TBitBtn;
    PageControl1: TPageControl;
    tabWeb: TTabSheet;
    tabTexto: TTabSheet;
    txtResultado: TMemo;
    resultadoWeb: TWebBrowser;
    opTexto: TRadioButton;
    opWeb: TRadioButton;
    procedure txtMensajeChange(Sender: TObject);
    procedure txtNumCaracteresChange(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure LWEBClick(Sender: TObject);
    procedure btEnviarClick(Sender: TObject);
    procedure txtUsuarioChange(Sender: TObject);
    procedure txtURLChange(Sender: TObject);
    procedure txtPasswordChange(Sender: TObject);
    function componerURLFinal () : string;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  formEnvioSMS: TformEnvioSMS;

implementation

{$R *.dfm}

function enviarSMS (url : string) : string;
var
  obtenerHTTP : TidHTTP;
  web : TStringList;
begin
  web := TStringList.Create;
  obtenerHTTP := TidHTTP.Create(nil);
  try
    web.Text := obtenerHTTP.Get(url);
  except
    on e: exception do
    begin
      obtenerHTTP.Free;
    end;
  end;
  enviarSMS := web.Text;
end;

function TformEnvioSMS.componerURLFinal;
var
  url, numeroTelefono, mensaje, usuario, contrasena : string;
  urlFinal : string;
begin
  url := txtURL.Text;
  numeroTelefono := txtNumeroMovil.Text;
  mensaje := txtMensaje.Text;
  usuario := txtUsuario.Text;
  contrasena := txtPassword.Text;

  urlFinal := url + '/?phonenumber=' + numeroTelefono +
      '&mensaje=' + mensaje +
      '&user=' + usuario + '&password=' + contrasena;

  txtURLFinal.Text := urlFinal;
end;

procedure TformEnvioSMS.txtMensajeChange(Sender: TObject);
begin
  lInfo.Caption := IntToStr(length(txtMensaje.Text)) +
      ' / ' + inttostr(txtMensaje.MaxLength);
  componerURLFinal;
end;

procedure TformEnvioSMS.txtNumCaracteresChange(Sender: TObject);
begin
  txtMensaje.MaxLength := StrToIntDef(txtNumCaracteres.text, 200);
end;

procedure TformEnvioSMS.FormCreate(Sender: TObject);
begin
  txtMensaje.MaxLength := StrToIntDef(txtNumCaracteres.Text, 200);
end;

procedure TformEnvioSMS.LWEBClick(Sender: TObject);
begin
  ShellExecute(Handle, Nil, PChar('http://www.ajpdsoft.com'),
      Nil, Nil, SW_SHOWNORMAL);
end;

procedure TformEnvioSMS.btEnviarClick(Sender: TObject);
begin
  if opTexto.Checked then
  begin
    txtResultado.Text := enviarSMS(txtURLFinal.Text);
    tabTexto.Show;
  end
  else
  begin
    tabWeb.Show;
    resultadoWeb.Navigate(txtURLFinal.Text);
  end;
end;

procedure TformEnvioSMS.txtUsuarioChange(Sender: TObject);
begin
  componerURLFinal;
end;

procedure TformEnvioSMS.txtURLChange(Sender: TObject);
begin
  componerURLFinal;
end;

procedure TformEnvioSMS.txtPasswordChange(Sender: TObject);
begin
  componerURLFinal;
end;


end.
MensajePublicado:
Mar Dic 28, 2010 8:17 pm
Top of PageVer perfil de usuario
webmasterplc
Excelente usuario


Registrado: Oct 31, 2009
Mensajes: 26

Asunto: Responder citando

que componentes usastes para esto pudes poner l unit para descarga saludos
MensajePublicado:
Jue Dic 30, 2010 5:15 pm
Top of PageVer perfil de usuario
webmasterplc
Excelente usuario


Registrado: Oct 31, 2009
Mensajes: 26

Asunto: Responder citando

CUAL COMPONENTE USASES HERMANO
MensajePublicado:
Dom Ene 02, 2011 7:32 pm
Top of PageVer perfil de usuario
alonsojpd
Administrador/Moderador


Registrado: Sep 16, 2003
Mensajes: 2687

Asunto: Responder citando

webmasterplc escribió:
CUAL COMPONENTE USASES HERMANO


En el siguiente enlace tienes la descarga de la aplicación AjpdSoft Envío de SMS vía Web BETA:

http://www.ajpdsoft.com/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=282

Es una versión no acabada, pero te servirá como ejemplo para lo que quieres.

Como componentes hemos usado: TWebBrowser, que va incluido en los componentes Indy de Delphi, no hay que instalarlo.

Si desarrollas la aplicación y quieres que la publiquemos comunícamelo en este hilo del foro y te paso una dirección de email para que nos lo envíes.
MensajePublicado:
Dom Ene 02, 2011 8:33 pm
Top of PageVer perfil de usuario
webmasterplc
Excelente usuario


Registrado: Oct 31, 2009
Mensajes: 26

Asunto: Responder citando

seguro que si
MensajePublicado:
Dom Ene 02, 2011 9:37 pm
Top of PageVer perfil de usuario
webmasterplc
Excelente usuario


Registrado: Oct 31, 2009
Mensajes: 26

Asunto: error Responder citando

me da un error al compilarlo
[Fatal Error] envioSMSWeb.dpr(6): File not found: 'ExceptionLog.dcu'
[Fatal Error] envioSMSWeb.dpr(6): File not found: 'ExceptionLog.dcu'
[Fatal Error] envioSMSWeb.dpr(6): File not found: 'ExceptionLog.dcu'[/img]
MensajePublicado:
Dom Ene 02, 2011 10:15 pm
Top of PageVer perfil de usuario
alonsojpd
Administrador/Moderador


Registrado: Sep 16, 2003
Mensajes: 2687

Asunto: Re: error Responder citando



Anuncios



webmasterplc escribió:
me da un error al compilarlo
[Fatal Error] envioSMSWeb.dpr(6): File not found: 'ExceptionLog.dcu'
[Fatal Error] envioSMSWeb.dpr(6): File not found: 'ExceptionLog.dcu'
[Fatal Error] envioSMSWeb.dpr(6): File not found: 'ExceptionLog.dcu'[/img]


Edita el fichero EnvioSMSWeb.dpr y cambia el código:

Código:

uses
  ExceptionLog,
  Forms,
  UnidadEnvioSMS in 'UnidadEnvioSMS.pas' {formEnvioSMS};



Por

Código:

uses
  Forms,
  UnidadEnvioSMS in 'UnidadEnvioSMS.pas' {formEnvioSMS};


Quitando "ExceptionLog" que pertenece a un componente que usamos llamado EurekaLog para captura de errores profesional. No es necesario para lo que tú lo necesitas.
MensajePublicado:
Lun Ene 03, 2011 12:34 pm
Top of PageVer perfil de usuario
frankolar
Buen usuario


Registrado: Jul 07, 2011
Mensajes: 6

Asunto: Responder citando

icon_surprised.gif Disculpen las molestias pero me interesa tambien esta informacion, no se si tienen mayor informacion al respecto, con este proyecto, para poder enviar mensajes de texto, tambien si se puede utilizar en cualquier pais, por ejemplo El Salvador...
MensajePublicado:
Vie Jul 08, 2011 10:12 pm
Top of PageVer perfil de usuario
frankolar
Buen usuario


Registrado: Jul 07, 2011
Mensajes: 6

Asunto: Responder citando

icon_surprised.gif Por favor si alguien me puede ayudar, me gustaria saver si se puede hacer el mismo proyecto de Google Calendar de VB.net en Lazarus o Delphi, por favor si me pueden ayudar me Urge por favor.

De antemano muchas gracias por la ayuda...
MensajePublicado:
Vie Jul 08, 2011 10:15 pm
Top of PageVer perfil de usuario
Mostrar mensajes de anteriores:   
Todas las horas son GMT - 1 Horas
Publicar nuevo tema Responder al tema
Foros de discusión » Borland Delphi, Codegear Delphi .Net  

Cambiar a:  
Key
  Puede publicar nuevos temas en este foro
No puede responder a temas en este foro
No puede editar sus mensajes en este foro
No puede borrar sus mensajes en este foro
No puede votar en encuestas en este foro
Visita nuestro nuevo sitio web con programas y contenidos actualizados: Proyecto A