Author Topic: Website to BL Server  (Read 3413 times)

I am not sure how the communications work with the internet to the server vice versa. I mostly want to know how the website interacts with the server. Anyone know how?

I am not sure how the communications work with the internet to the server vice versa. I mostly want to know how the website interacts with the server. Anyone know how?
You mean scripts on a website?

Yes that go to a blockland server.

Yes that go to a blockland server.
You mean through TCPObjects or HTTPObjects?

Are you looking for when torquescript gets/posts to a website?

It reads the pages line by line, if that's what you want

Like, you click a button on the website and it contacts your server depending on what the command was set as.

Like, you click a button on the website and it contacts your server depending on what the command was set as.
Blockland can give you the html of a website
you can only do things if you look at what the html is
so if a button's action is "post.php" you will have to post to that website using TCP objects and send the appropriate information
I don't think you can do anything about what the website runs to generate what is sent, but I do know that you can read what is sent

Like, you click a button on the website and it contacts your server depending on what the command was set as.
Add a javascript that connects to your server and sends stuff

Add a javascript that connects to your server and sends stuff
Can I get an example?

Like, you click a button on the website and it contacts your server depending on what the command was set as.

You need both the blockland server and the webserver to sustain a tcp connection in order for information to be sent both ways at any time.

This is an example implementation for irc chat on centralchat.net

Code: [Select]
function irc::onDNSFailed(%this)
{

      echo("DNS Failed");
}

function irc::onConnected(%this)
{
      echo("Connected");
      %this.sendline("NICK Blockhead-"@getnumkeyid()@"\r\n");
      %this.sendline("USER Blockhead-"@getnumkeyid()@" 0 * :Pete-"@getnumkeyid()@"\r\n");
}

 

function irc::onConnectFailed(%this)
{

      echo("Connection Failed");
}

 

function irc::onDisconnect(%this)
{

      echo("Disconnected");
}

 

function irc::onLine(%this, %line)
{

      echo("TCP: " @ %line);

   if(getword(%line, 0) $= "PING")
      %this.sendline("PONG" SPC getword(%line, 1) @ "\r\n");
   else if(strpos(%line, "End of \MOTD Command.") > -1)
      %this.sendline("ISON Blockhead"@getnumkeyid()@"\r\n");
   else if(strpos(%line, ":+iwx") > -1)
      %this.sendline("NAMES\r\n");
   else if(strpos(%line, "376") > -1)
   {
      %this.sendline("JOIN #NexusServer\r\n");
      %this.sendline("PRIVMSG Nickserv Identify Username password");
   }
}

function irc::sendline(%this, %line)
{
   echo("OUT: "@ %line);
   %this.send(%line);
}

function irc_Default()
{
   irc.connect("irc.centralchat.net:6667");
}

if(isobject(irc))
      return;
new tcpobject(irc);


rtb hosting
I have looked at that and I was still unable to find out how it works. Are there any tutorials or something?



Ok so now the http://localhost thing does not exist.. Can anyone help?

Yea, this took a long time for a long respond, I was doing things and I now I tried this out.
« Last Edit: September 22, 2013, 10:32:46 AM by Advanced Bot »

Ok so now the http://localhost thing does not exist.. Can anyone help?

Yea, this took a long time for a long respond, I was doing things and I now I tried this out.
1: you have to specify the port
if the server port (seen in the .cs) is something like 28080 you have to connect to http://localhost:28080
2: it only runs when the server is live