Blockland Forums > Modification Help
TCPObject GET requests
<< < (2/10) > >>
Brian Smithers:
thats because  the first arg is what your connecting to (the IP) and the second is the file.
Greek2me:

--- Quote from: Nexus on March 07, 2012, 07:13:20 PM ---Now I am trying this:

--- Code: ---dlr.get("http://98.227.200.17/shares:80", "/USB_Storage/testdoc.txt");
--- End code ---

but it calls onDNSFailed after about a second or two

--- End quote ---
Try removing the http:// part.
Nexus:

--- Quote from: Greek2me on March 07, 2012, 09:03:03 PM ---Try removing the http:// part.

--- End quote ---

I have tried it both ways
without just makes the DNS error come sooner for some reason
Brian Smithers:

--- Quote from: Nexus on March 07, 2012, 07:13:20 PM ---
--- Code: ---dlr.get("98.227.200.17:80", "/shares/USB_Storage/testdoc.txt");
--- End code ---

--- End quote ---
try that
Brian Smithers:
heres an example

function getMasterList()
{
   if(!isObject(BLMasterList))
      new HTTPObject(BLMasterList);
   BLMasterList.get("master2.blockland.us:80","/");
}
-lesnip-
function BLMasterList::onLine(%this,%line)
{
   if(firstWord(%line) $= "FIELDS" || firstWord(%line) $= "START" || firstWord(%line) $= "END")
      return;
   echo(serverHostFromList(%line) @ "'s "@ serverNameFromList(%line) @ " [P: " @ serverPlayersFromList(%line) @ " B: " @ serverBricksFromList(%line) @ " M: " @ serverMapFromList(%line) @ " P/D: " @ serverGetPassDediFromList(%line) @ " IP: " @ serverGetIPPortFromList(%line) @ "]");
}

done.
Navigation
Message Index
Next page
Previous page

Go to full version