This code:
new TCPObject(TCPObj)
{
site = "tomtest.kbyet.com";
port = 80;
};
function tcp()
{
TCPObj.connect("tomtest.kbyet.com:80");
}
function TCPObj::onConnected(%this)
{
echo("CONNECTED");
$file="/test.php";
$url="tomtest.kbyet.com:80";
%this.send("GET "@$file@" HTTP/1.0\nHost: " @$url@"\nUser-Agent: Torque\n\r\n\r\n");
}
function TCPObj::onLine(%this,%line)
{
echo(%line);
}
Did I mess up the User agent, because it sends me HTML for some webpage about PHP.
Wait I might of fixed it :P
EDIT: YES I GOT IT!
But it sends me this:
CONNECTED
HTTP/1.1 200 OK
Date: Fri, 12 Jun 2009 16:00:49 GMT
Server: Apache
Cache-Control: no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform
Expires: Fri, 12 Jun 2009 16:00:49 GMT
Vary: Accept-Encoding,User-Agent
Pragma: no-cache
Content-Type: text/html
X-Cache: MISS from demil1.byetcluster.com
X-Cache-Lookup: MISS from demil1.byetcluster.com:80
Via: 1.1 demil1.byetcluster.com:80 (Lusca/LUSCA_1.0)
before teh contetns of the file.
Anyway to remove it without removing the lines with Troque?