this is a whole new level of scripting to me, so maybe could give me some advice on the script i'm working on.
Here is what i want to do:
*Send llHTTPRequest to a server
*Receive data
*Read certain information out of the feedback
*Display it in chat
So far i did some research and found a script in the wiki, that helped me to do the first 2 steps.
//begin script
string URL="http://www.secondlife.com/httprequest/homepage.php";
//Replace URL with the path to your web server.
key http;//This stores the HTTP request we send.
default
{
touch_start(integer foo)
{
http=llHTTPRequest(URL, [] ,""
;}
http_response(key id,integer status, list meta, string body)
{
if(http==id)
{
integer i;
list lbody=llParseString2List(body,["\n"],[]);
integer count=llGetListLength(lbody);
//This turns newline characters char(10) into new lines in chat
//These are Unix/LSL style end of lines, use \r\n in place of \n for
// Windows style end of line from web server.
for(i=0;i<count;i++)
{
llOwnerSay(llList2String(lbody,i));
}
}
}
}
//end script
I pretty much understood what it does and it shows the server feedback in chat.
Now, my problem is, how to get to the special part of the information in the feedback, I want.
So, let's say the information I need is in line 15. Would it be correct to count all lines, go to line 15, read the string (maybe split it up) and then display it?
Maybe someone can give me advice on solving this problem.
Any help appreciated. Thank you very much!