Buchempfehlung
MySQL kurz & gut
MySQL kurz & gut
Das preiswerte Taschen- buch stellt MySQL-rele- vante Inhalte systematisch und knapp dar, sodass es sich optimal zum Nach- schlagen beim Pro- grammieren eignet. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

Jojo-Shoutbox-Wächter

Uploader:Mitgliedmcallister
Datum/Zeit:06.02.2008 23:35:08

'Siehe http://img168.imageshack.us/img168/1355/mcallisterprogxr0.png
'für Details (=Screenshot)!

'TSNE ist von ThePuppetMaster!

#include once "TSNE_V2.bi"

Dim G_Client as UInteger
Dim As Integer Start=1, p
Dim Shared As String Puffer
Dim As String Inhalt, LetzteVersion="", CRLF=CHR(13,10)

Declare Sub TSNE_Disconnected   (ByVal V_TSNEID as UInteger)
Declare Sub TSNE_Connected      (ByVal V_TSNEID as UInteger)
Declare Sub TSNE_NewData        (ByVal V_TSNEID as UInteger, ByRef V_Data as String)

WIDTH 80,60
CLS
PRINT
COLOR 14
PRINT "  SAGA-GAMES-SHOUTBOX-MONITOR 1.0"
COLOR 7
PRINT "            --- keine Software von Saga-Games! ---"
PRINT
PRINT " (c) 2008 ";
COLOR 11
PRINT "Captain McAllister ";
COLOR 7
PRINT "& Henning Bratfisch"
PRINT
PRINT "   ==> C. McAllister und H. Bratfisch stehen in keiner Verbindung zu"
PRINT "       Saga-Games, Saga-Musix, Saga-Cobol o.";CHR(132);"."
PRINT

Print DATE; " "; TIME; " [INIT] Client..."
Dim BV as Long
DO
    Print DATE; " "; TIME; " [Connecting]"
    Puffer=""
    BV = TSNE_Create_Client(G_Client, "sagagames.de", 80, @TSNE_Disconnected, @TSNE_Connected, @TSNE_NewData)
    If BV = 0 Then
        Print DATE; " "; TIME; " [OK]"
    Else
        Print DATE; " "; TIME; " [FEHLER] " & TSNE_GetGURUCode(BV)
    End if
    Print DATE; " "; TIME; " [WAIT] ..."
    TSNE_WaitClose(G_Client)
    Print DATE; " "; TIME; " [WAIT] OK"
    p = INSTR(Puffer,CRLF+CRLF)
    Puffer = MID(Puffer,p+4)
    If Puffer <> LetzteVersion Then
        If Start = 1 Then
            Start = 0
        Else
            Beep
            COLOR 12
            Print DATE; " "; TIME; " [NEU] Neuigkeiten in Jojos Shoutbox!!!11elf"
            COLOR 7
        End If
    End If
    LetzteVersion = Puffer
    SLEEP 60000
Loop Until Inkey = CHR(27)
Print DATE; " "; TIME; " [END]"
sleep
End


Sub TSNE_Disconnected(ByVal V_TSNEID as UInteger)
Print DATE; " "; TIME; " [DIS]"
End Sub

Sub TSNE_Connected(ByVal V_TSNEID as UInteger)
Print DATE; " "; TIME; " [CON]"
Dim D as String
Dim CRLF as String
CRLF = Chr(13) & Chr(10)
D = D & "GET /shoutbox.php HTTP/1.1" & CRLF
D = D & "Cookie: shoutbox="+chr(34)+"deleted"+chr(34)+"; path=/" & CRLF
D = D & "Host: sagagames.de" & CRLF
D = D & "User-Agent: Moped/5.0 (Fensters; U; Fensters MT 3.51; de; rv:1.0.1.11) Gockel/20080231 Firefux/3.0.0.11" & CRLF
D = D & "connection: close" & CRLF
D = D & CRLF
Print DATE; " "; TIME; " [SEND] ..."
TSNE_Data_Send(V_TSNEID, D)
Print DATE; " "; TIME; " [SEND] OK"
End Sub

Sub TSNE_NewData (ByVal V_TSNEID as UInteger, ByRef V_Data as String)
Print DATE; " "; TIME; " [NDA] LEN=" & LEN(V_Data)
Puffer += V_Data
End Sub