Blockland Forums > Modification Help

Interfacing With a Website Using TCPObject::send()

Pages: (1/2) > >>

Wizard:

I'd like to know how it's done.

Er, I need to be more specific, I want to send data to a webpage and have that data affect the text on a webpage.

Kalphiter:


--- Code: ---new TCPObject(asdf);

function asdf::onConnected(%this)
{
    %build = "POST / HTTP/1.1\r\nUser-Agent: Torque/1.0\r\nHost: blockland.us\r\nAccept: */*\r\n\r\n";

    %this.send(%build);
}

function asdf::onLine(%this, %line)
{
    echo(%line);
}

asdf.connect("blockland.us:80");
--- End code ---


Wizard:

Updated op

Kalphiter:

I'm not here to give you server-sided stuff.

Wizard:

If it's particularly complicated and you'd rather not explain just say the word and I'll lock the topic since I'm not likely to get help.

Pages: (1/2) > >>

Go to full version