Author Topic: Linking collected server data to a Website  (Read 787 times)

*Title*
I am new to SQL and PHP. What I want to do is link up collected BL server statistics to a test website which I am using dropbox as a web server for it.
http://Atn.site44.com (I am planning on getting a domain name later, but this is for my educational purposes)
Can anyone help guide me?

Example:
If I am hosting a knife TDM and typically knife TDM servers collect your levels and # of kills.
I want to take that data and display it onto a website.

The current tools I am using are:
Microsoft 2013 Access
Notepad++
« Last Edit: February 20, 2014, 03:26:04 PM by Atn »

You cannot use dropbox to host php and mysql.

You cannot use dropbox to host php and mysql.
that

Try looking into 000webhost for your hosting needs

...Ok fine. But once I do get setup there, can you help me out?

that

Try looking into 000webhost for your hosting needs
I read the ToS. It says File sharing is not allowed.

I read the ToS. It says File sharing is not allowed.
file sharing is like hosting mediafire on a free account, what you are doing is an external database, which afaik is not against their ToS.

file sharing is like hosting mediafire on a free account, what you are doing is an external database, which afaik is not against their ToS.
Ok thank you

To send data from the Torque client to a webserver can be done as follows:


function TCPObject::onConnected(%this)
{
   %data = "var=something";
   %this.send("POST /file.php HTTP/1.1\r\nHost: host.com\r\nConnection: Close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: " @ strlen(%data) @ "\r\n\r\n" @ %data @ "\r\n");
}


Then on the PHP side

$data = $_POST['var'];


Now for example:
If you wanted to send "cheese" from torque to the remote php file host.com/asdf.php you would do the following
TCPObject.connect("host.com:80");
and edit the onConnected function to:

function TCPObject::onConnected(%this)
{
   %data = "var=cheese";
   %this.send("POST /asdf.php HTTP/1.1\r\nHost: host.com\r\nConnection: Close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: " @ strlen(%data) @ "\r\n\r\n" @ %data @ "\r\n");
}

[/tt]

Then on the php end you should have the variable $data equal to "cheese"

Hope this somewhat helps :)

for information on php and mysql http://tizag.com
« Last Edit: February 20, 2014, 08:29:50 PM by Fluff-is-back »

Thank you so much. I very much needed this.