Samstag, 19. August 2017
 
 

Beispiele

Here some XML examples for some script languages like PHP, Python, ASP, VBscript-Class, C#, Java, Jabber...

PHP | Python | ASP/VB-Script | VBscript Class | C# | Java | Jabber

If you want to use Javascript, we recommend our JSON API (REST).



 

C#

Please notice that this C# example is not a complete script.
It only shows the method of how the connect can be made.
The script has been provided by a client, so please be
aware that you are going to use this script on your own
risk.

C# Example 1:

/*
 * SunSMS.cs Copyright (C) 2004 Manuel Kaderli
 * http://www.suntsu.ch
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation;
 * either version 2 of the License, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE. See the GNU General Public License for more
 * details.
 */

using System;
using System.Xml;
using System.Net.Sockets;
using System.IO;
using System.Text;
using System.Net;

class SunSMS
{

  public static int port = 5061;
  public static string host = "xml1.aspsms.com";
  public static string url = "/xmlsvr.asp";

  public static void Main(string[] args)
  {
    SunSMS sms = new SunSMS();
    sms.sendNewSms();
  }

  private void sendNewSms()
	{
      string message =
      "my first sms with c#";

    HttpWebRequest httpRequest = (HttpWebRequest)
       WebRequest.Create("http://" + host + ":" + port + url);
    httpRequest.Method = "POST";
    httpRequest.ContentType = "text/xml";
    Stream requestStream = httpRequest.GetRequestStream();
    XmlTextWriter xmlTextWriter = new XmlTextWriter(requestStream,
       System.Text.Encoding.UTF8);
    xmlTextWriter.WriteStartDocument();
    xmlTextWriter.WriteStartElement("aspsms");

    xmlTextWriter.WriteStartElement("Userkey");
    xmlTextWriter.WriteString("your userkey");
    xmlTextWriter.WriteEndElement();

    xmlTextWriter.WriteStartElement("Password");
    xmlTextWriter.WriteString("your password");
    xmlTextWriter.WriteEndElement();

    xmlTextWriter.WriteStartElement("Recipient");
    xmlTextWriter.WriteStartElement("PhoneNumber");
    xmlTextWriter.WriteString("004179xxxxxxx");
    xmlTextWriter.WriteEndElement();
    xmlTextWriter.WriteEndElement();

    xmlTextWriter.WriteStartElement("MessageData");
    xmlTextWriter.WriteString(message);
    xmlTextWriter.WriteEndElement();

    xmlTextWriter.WriteStartElement("Action");
    xmlTextWriter.WriteString("SendTextSMS");
    xmlTextWriter.WriteEndElement();

    xmlTextWriter.WriteEndElement();

    xmlTextWriter.Close();
    HttpWebResponse httpResponse = (HttpWebResponse)
        httpRequest.GetResponse();
    Console.WriteLine("Response is:");
    StreamReader streamReader = new
        StreamReader(httpResponse.GetResponseStream(), System.Text.Encoding.UTF8);
    Console.WriteLine(streamReader.ReadToEnd());
    streamReader.Close();
    httpResponse.Close();
  }
}


 

C# Example 2:

/*
 * SMSclass.txt Copyright (C) 2005 uga
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation;
 * either version 2 of the License, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE. See the GNU General Public License for more
 * details.
 */
Download: SMSclass.txt


 
Limitations of Liability
In no event shall we be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise.


 
More XML examples:

PHP | Python | ASP/VB-Script | VBscript Class | C# | Java | Jabber


Neuanmeldung

Hier geht's zur ASPSMS Neuanmeldung. Haben Sie sich bereits registriert?
Melden Sie sich mit Benutzer E-Mail Adresse und Login-Passwort an.

Username 
Password 
Login-Passwort vergessen?   


SMS Tools und Interfaces für ASPSMS

Factsheets
Einsatzmöglichkeiten und Business BeispielePDF
SMS Tools für Endanwender
NamePreis
NEU: ASPSMS WinLog gratis
Microsoft Office Outlook 2013-2016: E-Mail to SMSgratis
Microsoft Office Outlook 2010 Mobile Servicegratis
SMSBLASTER web editiongratis
SMSBLASTER Club-Aktion gratis
SMS Blaster Windows Editiongratis
SMS touch for iPhone and iPod touchShareware
ECO-SMS - Ökologische SMS!Shareware
Cybersystems mscrmSMSsiehe Preisliste
Jabber-Client Chatopus for Palm OSkleine Gebühr
delight Software GmbHsiehe Preisliste
ASPSMS Widget for Macgratis
SMS Scripts und Schnittstellen für Entwickler
NamePreis
ASPSMS Dot Net Assembly auf NuGet gratis
ASPSMS JSON API (REST) gratis
C# Microsoft ASP.NET Identity MVC (for SOAP)gratis
Node.js interface for ASPSMSgratis
PHP Class for ASPSMS SOAP web servicegratis
aspsms.dll (Active-X)gratis
SOAP Web Servicegratis
XML-Interfacegratis
ASPSMS SMTP Interfacegratis
VBscript Class (ASP)gratis
HTTPgratis
PHP - Python - C# - Javagratis
Jabber to SMS for Server Adminsgratis (open source)
SMS Blaster Visual Basic Source Codegratis
ASPTOKENgratis
Netzwerkabdeckung
Weltweit unterstützte Mobilfunknetze
VADIAN.NET AG
Katharinengasse 10
CH - 9004 St.Gallen
 
Telefon: +41 71 246 56 56
Telefax: +41 71 246 56 57
E-Mail: keyaccounts@aspsms.com
 
Gründungsjahr: 1995
Firmennummer: CH-170.3.020.905-6
MWST-Nummer: CHE-102.692.722 MWST

Schweizer Qualität

BAKOM registriert – Eingetragener Schweizer Fernmeldedienstanbieter (254900005).

ASPSMS ist ein Produkt der 1995 gegründeten VADIAN.NET AG, einem in der Schweiz ansässigen Internet und Mobile Solutions Unternehmen. Sämtliche von Ihnen erfassten Daten unterliegen somit automatisch den strengen Datenschutzrichtlinien der Schweiz. ASPSMS ist Schweizer Technologie, die vollumfänglich in der Schweiz entwickelt wird. Das Support-Team arbeitet ebenfalls in der Schweiz. VADIAN.NET ist heute einer der weltweit führenden Anbieter von SMS-Lösungen mit mehr als 200‘000 zufriedenen Geschäftskunden. Das Produkt ASPSMS wurde im Jahr 2001 lanciert.

Copyright 1995 - 2017 by VADIAN.NET AG