Jump to content

Create a Homepage per TCP ?


Busti
 Share

Recommended Posts

Okay, this is my code :

Global $Connections = 0
; Start Up
TCPStartup()

; Create Socket
$aSocket = TCPListen(@IPAddress1, 6112)
While 1
    $ConnectedSocket = TCPAccept( $aSocket)
    If $ConnectedSocket >= 0 Then
        $string = FileRead( "test.txt" )
        TCPSend( $ConnectedSocket, $string  )
        $Connections += 1
        TrayTip( "Connection INFO" , "Connections : " & $Connections & @CRLF & "Socket : " & $ConnectedSocket & @CRLF & "Incoming : " & TCPRecv( $ConnectedSocket, 20000 ) , 0 )
    EndIf
WEnd

and this is test.txt :

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Google</title>
</head>
<body>

test oO.

</body>
</html>

But it doesnt work :<.

Can someone explane me why ?

They can connect on me, but the Browser Displays nothing..

And yes,i saw the Web.au3, but i dont want to use Apache server or smt. i want to do it without, but i cant find any tip how to start, or what i have to send.

i hope you can help me!

Greetings busti

My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Link to comment
Share on other sites

Id like to see the code also, even though there was a guy a while back who posted a AutoIt written web server.

UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...