Is there a way to get the contents of a URL within a BYOND game?
For the XML library I'm working on, I would like the demo to show the power of using XML for games by downloading the Dark Age of Camelot XML files (they store server status, guild info, and spell info online in XML to let people put the info on their fan sites) and displaying live info parsed from the XML.
If there isn't a way, then this is a feature request!
(I never played Search Engine Wars, but I'm hoping maybe that did something similar...)
ID:148251
![]() May 10 2003, 8:02 am
|
|
Garthor wrote:
mob Thanks, I'll try that out. Unfortunately it turns out that the files I was planning to download are too large to realistically turn into XML for the demo (23k lines for spells!) But the technique should be generally useful anyway. |
I used this in a few of my games but i found it impractical to use XML downloaded from a server rather than client side saves.
|
verb
test(var/url as text)
var/text = ""
var/http[] = world.Export(url)
if(!http)
usr << "Failed to connect."
return
var/F = http["CONTENT"]
if(F)
text += html_encode(file2text(F))
usr << browse(text)