max_w1 Posted July 16, 2011 Share Posted July 16, 2011 Hi everyone, I am trying to Post some data from second life using the secondlife function called llHTTPRequest() i am able to get it work normally(without using codeigniter) by just using the $_POST[] method. my lsl script is something like this: string parameters = "userkey="+myuserkey+"&username="+myusername; myRequest = llHTTPRequest("http://www.lespectra.com/tl_test.php",[HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"],parameters); this script returns value like http://www.lespectra.com/tl_test.php?userkey=01&username=something (secondlife sends this value to my webpage using the POST method, hence i am able to retrieve the value by using the $_POST) Now the tough part comes, how do i do it using CodeIgniter? i tried to change my secondlfe script to: string parameters = "userkey/"+myuserkey+"/username/"+myusername; myRequest = llHTTPRequest("http://www.lespectra.com/tl/index.php/site/myfunction/",[HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"],parameters); i assume this should return value like http:www.lespectra.com/tl/index.php/site/myfunction/userkey/01/username/someting even if it returns this value which i am expecting i cannot use the uri_segment() function in codeigniter because the value is in POST. i cannot even use the $this->input->post() content because the $this->input->post() expects data to be in " ?info=value " format not in " info/value " format. Does this mean i cannot use codigniter for this project? Quote Link to comment https://forums.phpfreaks.com/topic/242108-codeigniter-with-secondlife-scripting/ Share on other sites More sharing options...
max_w1 Posted July 16, 2011 Author Share Posted July 16, 2011 Solved it! just had to change string parameters = "userkey/"+myuserkey+"/username/"+myusername; myRequest = llHTTPRequest("http://www.lespectra.com/tl/index.php/site/myfunction/",[HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"],parameters); to string parameters = "userkey="+myuserkey+"&username="+myusername; myRequest = llHTTPRequest("http://www.lespectra.com/tl/index.php/site/myfunction/",[HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"],parameters); Quote Link to comment https://forums.phpfreaks.com/topic/242108-codeigniter-with-secondlife-scripting/#findComment-1243368 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.