Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HTTP Request and Parsing Strings Help

Infrared Wind
Gridologist
Join date: 7 Jan 2007
Posts: 662
10-05-2008 23:33
Need some feedback/help.

I'm working on a video script that makes an httprequest to a php script on a
server. I want to send something like the following back to SL:

"some string with spaces", "http:\\someurl\somebit?var=somevar&var=etc"

CODE


http_response(key request, integer status, list meta, string body)
{
list datalist = llParseString2List( body, [","], [] );
title = (string)llList2String(datalist,0);
url = (string)llList2String(datalist,1);

...etc...

}




I'm at work and am thinking about this, but don't have an SL client here to
test.

Thanks for any _http_response_ =)
Infrared Wind
_____________________
Infrared Wind
Gridologist
Join date: 7 Jan 2007
Posts: 662
10-06-2008 07:06
Yes, that works fine.

Although I used the pipe character (|) instead of commas. And no quotes.

Sweet.
_____________________