ID:159621
 
Well, I asked this in a recent post I made but it really doesn't fit into that topic so I was wondering, how would I make a savefile from the format=text of member pages and recieve variables from it?
proc
GetSavefile(url)
var/list/http=world.Export(url)
if(!http)
CRASH("Could not connect to [url].")
var/content=file2text(http["CONTENT"])
var/savefile/F=new()
F.ImportText("/", content)
return F

This is from hub://Nickr5.n_HubInfo
In response to Nickr5
I wish I could get the whole demo =(...It says failed to unzip. Do you suppose I could get the demo somehow?
In response to Choka
Ah, thanks for telling me, I'll have it fixed after I post this.

To get information from someone's profile, however, take a look at the format of your user page:
general
        email = "[email protected]"
        is_member = 1
        ckey = "choka"
        online = 1
        joined = "2007-05-12"
        gender = "male"
        key = "Choka"

To get the joined date, for example you would use this code:
var/savefile/F=GetSavefile("http://www.byond.com/members/Choka?format=text")
F.cd="general" //all information is stored under the 'general' directory
usr<<F["joined"] //outputs 2007-05-12


Note, however, that much of the information you can find here is already obtainable through a <code>/client</code> procedure or variable, in which case you should use that instead.

Edit: The download link should work now, if not click here instead. It only works for game's hubs, though, since when I wrote it I didn't realize you could retrieve info from member's pages in the same way.