Game Development Community

The easiest way to post and recieve data from a web server?

by TechLord · in Technical Issues · 11/16/2005 (3:21 am) · 6 replies

I'm looking for the easiest way to do this in Torque Script. Its the final step to completing my first torque game. Thanks.

#1
11/16/2005 (3:58 am)
Search around for labrat's TCPObject example on hte forums. It will give you all hte info you need.
#2
11/16/2005 (8:35 am)
Is this the tutorial you refer to Chris?

http://www.garagegames.com/mg/forums/result.thread.php?qt=11127
#3
11/16/2005 (8:40 am)
The tutorial mentions the TCPObject Listen method is 'a bit buggy'. Has the been corrected since the time of the tutorial? I will need to use this method as well.
#4
11/16/2005 (8:45 am)
No that's not it. I was referring ot this thread:

www.garagegames.com/mg/forums/result.thread.php?qt=34935

If you need hte ability to post to the server I use this connection string:

%postdata = "name=" @ $name;

$tcpserv.send("POST /directory/script.php HTTP/1.1\r\nHost: www.spunkygames.com\r\nContent-type: application/x-www-form-urlencoded\r\nContent-length: " @ strlen(%postdata) @ "\r\n\r\n" @ %postdata @ "\r\n");

Hope that helps you out.
#5
11/16/2005 (9:51 am)
Chris,

Thanks. I'll play with this and see if i can get it to work.
#6
05/26/2006 (5:07 am)
Http://www.garagegames.com/blogs/32/10202