Thomas Füssl
 
  zurück      Startseite      Gästebuch      Kontakt 
  ©2003 by thfu - Mail an Webmaster   

Freeware

nach Themen:
 Internet
 Multimedia
 System
 Visual Basic

nach Kategorien:
 Programme
 VB-Bibliotheken
 VB-Sourcecode

Index:
 Alle Downloads
 Alle Artikel


Über...

 Sinn und Unsinn
 Gästebuch
 über mich


Partner-Link
EMails und 1 GB kostenloser Speicher bei
GMX

Partner-Link
Bücher bestellen bei
Amazon

 

Freeware
Programme

Mini-WebServer
kleinster Web-Server
VBTools
Werkzeuge für Visual Basic
KeyReMap
Tasten umbelegen
Exe/Bmp-PropertyPage
Eigenschaftsseite
VB-Setup
Setup-Programm
Registry-Tricks


VB-Bibliotheken


Apfel.Ocx
Apfelmännchenprogramm
RegExp.Dll
Reguläre Ausdrücke für VB
SerialID.Dll
Disk-Nummer r/w


VB-Sourcecode Tipps&Tricks


TCP/IP-Klassen
Rekursiv
MIME-Kodierung (base64)
Internet
MinMax
Format 8.3
Standard-Dialoge


Internet-Programmierung unter VB

Client-Klassen

Beispiel-Code

HTTP-Client

Folgender Code ruft eine HTTP-Seite ab:

Dim http As New HttpClient
http.GetDocument "http://www.microsoft.com/"
Text1.Text = http.Document

Folgender Code speichert eine HTTP-Seite ab:

Dim http As New HttpClient
http.GetFile "http://www.microsoft.com/", "ms.html"

benötigt zusätzlich aus dem Download-Paket:
Socket.cls
Socket.bas
HttpClient.cls


FTP-Client

Folgender Code ruft eine FTP-Seite ab:

Dim ftp As New FtpClient
If ftp.Connect("ftp.microsoft.com", "anonymous", "anonymous@anonymous.com") Then
   Text1.Text = ftp.GetDocument("/Softlib/index.txt")
   'oder: ftp.GetFile "/Softlib/index.txt", "liste.txt"
   ftp.Disconnect
Else
   MsgBox "cannot connect"
End If

benötigt zusätzlich aus dem Download-Paket:
Socket.cls
Socket.bas
FtpClient.cls


SMPT-Client

Folgender Code versendet eine EMail:

Dim smtp As New SmtpClient
smtp.From = "test@thfu.de"
If smtp.Connect("smtp.puretec.de") Then
   smtp.SendMail "test@fuessl.de", "Subject", "Mailtext..." + vbCrLf + "Thomas."
   smtp.Disconnect
Else
   MsgBox "cannot connect"
End If

benötigt zusätzlich aus dem Download-Paket:
Socket.cls
Socket.bas
SmtpClient.cls


POP-Client

Folgender Code ruft den Posteingang am POP-Server ab:

Dim pop As New PopClient
If pop.Connect("pop.xxxxx.de", "account", "passwd") Then
   If pop.GetMails Then
      For n% = 1 To pop.MessageCount
         List1.AddItem pop.MessageDate(n%) + " " + pop.MessageFrom(n%) + " " + pop.MessageSubject(n%)
      Next
   End If
   pop.Disconnect
End If

benötigt zusätzlich aus dem Download-Paket:
Socket.cls
Socket.bas
PopClient.cls


NNTP-Client

Folgender Code listet alle Newsgruppen eines News-Servers:

Private WithEvents nntp As NntpClient

Sub ListGroups()
Set nntp = New NntpClient
If nntp.Connect("news.heise.de") Then
   nntp.GetAllGroups()
   nntp.Disconnect
Else
   MsgBox "cannot connect"
End If
Set nntp = Nothing
End Sub

Sub nntp_ListGroups(Group As String)
List1.AddItem Group
End Sub

benötigt zusätzlich aus dem Download-Paket:
Socket.cls
Socket.bas
NntpClient.cls