Jump to content
Sign in to follow this  

HTTP server

Recommended Posts


I'm trying to write a simple basis for an HTTP server that I will be using in a future project.

So far, my host uses a simple code that will reply to an HTTP connection. However, I don't know how to send data back to the browser I am requesting data with.

$socket = TCPListen("",80,10)
$data = -1
MsgBox(0,"","socket created")
    $data = TCPAccept($socket)
Until $data <> -1
While 1
    $data1 = TCPRecv($data,9999)
    If @error then ExitLoop
    If $data1 <> "" and StringInStr($data1,"GET") = 1 then ;eventually it will only reply to specific requests
        MsgBox(0,"RECEIVED TRANSMISSION",$data1)

How simple is it to implement a response?

Thank you in advance :)

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.