Jump to content
Sign in to follow this  
Busti

Create a Homepage per TCP ?

Recommended Posts

Busti

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

Share this post


Link to post
Share on other sites
Richard Robertson

You are using the correct port in the address right? Http is normally through port 80 while you are listening on port 6112.

Are you going to http://127.0.0.1:6112/ ?

Share this post


Link to post
Share on other sites
Busti

im going to : wowhack.servehttp:com:6112 , yes this is my ip ...


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

Share this post


Link to post
Share on other sites
Busti

found out how, can be closed.

Edited by Busti

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

Share this post


Link to post
Share on other sites
jokke

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.

Share this post


Link to post
Share on other sites
Busti

i post the udf if its finished. :)


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

Share this post


Link to post
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
Sign in to follow this  

×