Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sending data to my mysql server

alchymi Pau
Registered User
Join date: 13 Jan 2007
Posts: 1
03-05-2007 23:20
Here is my problem with the script below on some sims the "bouton" doesn't work . Many it is due to the 20 seconds delay for lloadURL ?

I have seen that there is a llhttprequest but i don't understand how it work.

My goal is simply to make my bookmarks in a SQL database for faster search engine that the one provided ingame, for myself use.




string escape(string msg)
{
return llDumpList2String(llParseString2List(msg, [" "], []), "%20";);
}

default
{
state_entry()
{
llSetText("SL GEO TAGGING", <1.0, 1.0, 1.0>, 1.0);
llListen(121, "", llGetOwner(), "";);
llOwnerSay("Ready";);
}

attach(key id)
{
if (id == llGetOwner()) {
llOwnerSay("Toucher moi !:";);
}
}

touch_start(integer total_number)
{
vector pos = llGetPos();


key av = llDetectedKey(0);
string avName = llDetectedName(0);
string url = "http://urlofmyphpfile/write.php?region="+ escape(llGetRegionName())+"&pox="+(string)llRound(pos.x)+"&poy="+(string)llRound(pos.y)+"&poz="+(string)llRound(pos.z)+"&name="+avName;

llLoadURL(av, "Enregistrer", url);

}

listen(integer c, string name, key id, string msg)
{
list bits = llParseString2List(msg, [","], []);
bits = llListReplaceList(bits, [escape(llList2String(bits, 0))], 0, 0);

}
changed(integer change)
{
if (change & CHANGED_OWNER) {

}
}
}
Meni Kaiousei
knowledgebase junkie
Join date: 6 Nov 2006
Posts: 162
03-06-2007 00:19
Some land owners do not allow to run scripts on their land. You can find the exact rules here:
http://secondlife.com/knowledgebase/article.php?id=297