Jump to content
  • 0

how can i insert data from second life to mysql


ramyegy
 Share

You are about to reply to a thread that has been inactive for 4215 days.

Please take a moment to consider if this thread is worth bumping.

Question

4 answers to this question

Recommended Posts

  • 0

Another example to ad to Montis great answer answer :)

HERE is a bit of an example as well. A subscriber list can give you a general idea of structure on the php side

http://wiki.secondlife.com/wiki/PHP_Example_for_Subscriber_List

and HTTP request http://wiki.secondlife.com/wiki/Http_request is the in world scripting side

For help with scripting there is also a scripting forum to ask questions on a long term basis @ http://community.secondlife.com/t5/LSL-Scripting/bd-p/LSLScripting

Link to comment
Share on other sites

  • 0

To send data from a LSL script (in second life) to a web server using the HTTP GET method you can use this snippet. LSL does not support direct database queries, so you need to use a web server to put data into your mysql database server.

// the URL of the webserver you want to send data to

string my_url = "http://www.example.com/?";

// string data you want to send to the web server

string mydata1 = "some data you want to send";

// integer data you want to send to the web server

integer mydata2 = 2;

// Stick the data together into a format suitable for HTTP GET

// note the use of llEscapeURL of the data to be sure your data is formatted

string my_data = "var1=" + llEscapeURL(mydata1) + "&var2=" + llEscapeURL((string)mydata2);

// send the data to the web server.

// you get the response in the "http_response()" event handler.

// This includes the HTTP response codes.

llHTTPRequest(my_url+my_data, [], "");

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4215 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...