PDA

View Full Version : loading a string into a variable from the web


marev
11-08-2001, 09:33 PM
Hi there,

I've been trying to set up a string into a variable, the string having been gotten from a text file on a web site.

servinput=new String ( loadVariables ("http://www.sitename.com/filename.txt", " ", "GET") );

Is this impossible, or is it possible and I'm just doing it wrong?

Thanks for any thoughts or advice!

Marev

Jesse
11-08-2001, 10:58 PM
you're doing it wrong.
you setup your text file like this:
variable1=value blah blah&variable2=some other junk
where the ampersand (&) marks the end of a variable and the beginning of the next. Then you just use
loadVariablesNum ("file.txt", 0);
which will load in and establish variable with those names and values.

marev
11-08-2001, 11:07 PM
Oh my brain hurts, it should have been so obvious.

Thanks!