how to pass the data from torque scripts to html?
by mafan · in Torque 3D Beginner · 07/26/2011 (8:53 am) · 6 replies
Can anyone give me a guide line how to pass the data from the torque scripts to the html?
#2
07/26/2011 (5:57 pm)
Do you have tutorial for how to connect to php?
#3
my coding is like below.
function doStuff()
{
%obj = new HTTPObject();
//%address = "www.yourSiteHere.com:80";
%server = "localhost:80";
%path = "/sample1.php";
%query = "v=1"; //I just always call the values v
%obj.get(%server, %path, %query);
echo("do stuff");
}
<html>
<?
$a = $_GET['v'];
echo $a;
?>
</html>
got any others setting that i nid to do to connect to the php? Waiting for ur answer...
07/27/2011 (6:46 am)
i got read ur post in another forum topic, i try to use ur coding, but it seem like nothing happen.my coding is like below.
function doStuff()
{
%obj = new HTTPObject();
//%address = "www.yourSiteHere.com:80";
%server = "localhost:80";
%path = "/sample1.php";
%query = "v=1"; //I just always call the values v
%obj.get(%server, %path, %query);
echo("do stuff");
}
<html>
<?
$a = $_GET['v'];
echo $a;
?>
</html>
got any others setting that i nid to do to connect to the php? Waiting for ur answer...
#4
my 'core/prefs.cs'
$Pref::Server::AdminPassword = "";
$Pref::Server::BanTime = 1800;
$Pref::Server::ConnectionError = "======";
$Pref::Server::FloodProtectionEnabled = 1;
$Pref::Server::Info = "This is a Torque 3D server.";
$Pref::Server::KickBanTime = 300;
$Pref::Server::MaxChatLen = 120;
$Pref::Server::MaxPlayers = 64;
$Pref::Server::Name = "Torque 3D Server";
$Pref::Server::Password = "";
$Pref::Server::Port = 28000;
$Pref::Server::RegionMask = 2;
$Pref::Server::TimeLimit = 20;
07/27/2011 (8:54 am)
got the error "unable to open file 'core/prefs.cs' for writing"my 'core/prefs.cs'
$Pref::Server::AdminPassword = "";
$Pref::Server::BanTime = 1800;
$Pref::Server::ConnectionError = "======";
$Pref::Server::FloodProtectionEnabled = 1;
$Pref::Server::Info = "This is a Torque 3D server.";
$Pref::Server::KickBanTime = 300;
$Pref::Server::MaxChatLen = 120;
$Pref::Server::MaxPlayers = 64;
$Pref::Server::Name = "Torque 3D Server";
$Pref::Server::Password = "";
$Pref::Server::Port = 28000;
$Pref::Server::RegionMask = 2;
$Pref::Server::TimeLimit = 20;
#5
http://www.garagegames.com/community/resources/view/21123
It explains how to perform a simple HTTP POST on a php script which is what you seem to be looking for.
07/27/2011 (11:17 am)
Hello mafan, I would recommend checking out my resource on TCP objects.http://www.garagegames.com/community/resources/view/21123
It explains how to perform a simple HTTP POST on a php script which is what you seem to be looking for.
#6
07/30/2011 (2:00 am)
Thanks for ur link, Robert Fritzen, i can link to the web server alr.
Torque 3D Owner Ted Southard