Jump to content
  • 0

URL passed to llHTTPRequest


peppos Popstar
 Share

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

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

Question

integer systemchan = -111;
integer syslis;
string baseurl = "http://www.^^^^^^^^^^^^^/petname/";
string filename = "Breedable_Pet_Breed_Genes.php";
string password = "^^^^^^^^";
string method = "breedpetdetailsSEX";
string mpetid = "GODMOTHER";
string fpetid = "GODFATHER";
string mmpetid = mpetid;
string mfpetid = fpetid;
string fmpetid = mpetid;
string ffpetid = fpetid;
string sex = "Male";
key fetchid;
fireURL()
{
    string url = baseurl+filename+"?action="+method+"&password="+password+"&mpid="+mpetid+"&fpid="+fpetid+"&mmpid="+mmpetid+"&mfpid="+mfpetid+"&fmpid="+fmpetid+"&ffpid="+ffpetid+"&sex="+sex+"&userid="+(string)llGetOwner();
    fetchid = llHTTPRequest(url,[],"");
}
string newpetid;
integer createcountdown = 0;
createpet()
{
   llRezObject("CBXGhostMonkNest",llGetPos()+<0,0,0.250>,ZERO_VECTOR,llGetRot(),123);
}
integer locked = 0;
default
{
    object_rez(key id)
    {
        llSleep(2.0);
        llRegionSayTo(id,systemchan,"CREATEPET^"+newpetid+"^"+mpetid+"^"+fpetid);
        llGiveInventory(id,"CBXGhostMonkNest");
        llGiveInventory(id,"CBXGhostMonk");
        llSleep(2.0);
        llDie();
    }
    state_entry()
    {
        sex = llGetObjectDesc();
        llSetText("Touch me to birth this "+sex+" offspring",<1,1,1>,1);
    }
    timer()
    {
        if(createcountdown > 0)
        {
            createcountdown--;
            if(createcountdown == 0)
            {
                createpet();
            }
        }
        llSetText("Waking up the baby in "+(string)createcountdown+" sec(s)",<1,1,1>,1);
    }
    http_response(key r,integer s,list d,string body)
    {
        if(r == fetchid)
        {
            newpetid = body;
            createcountdown = llFloor(llFrand(120.0));
            llSetTimerEvent(1.0);
        }
    }
    touch_start(integer x)
    {
        if(llDetectedKey(0)!=llGetOwner())return;
        if(locked == 0)
        {
            locked = 1;
            fireURL();
        }
    }
}

 

please someone can help me with this problem? this is a generator script for breedable. this breedable communicates with the php server

everything work fine,my problem is (URL passed to llHTTPRequest contains a control character) then cannot communicate php with secondlife. i m not a scripter but i buy this full system on marketplace and the seller don't want help me..please anyone

 

Ver: 10.1.2
age: 0
hunger: 0
passion: 0
sex: Male
coat: Normal
eye: Normal
size: Normal
PETID: <br />?<b>Parse error</b>:  Invalid numeric literal 

Edited by peppos Popstar
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

This post really belongs in the LSL Scripting forum, so if you don't get a satisfactory answer here, I suggest asking the moderators to move it.

 Give a try at just replacing 

fetchid = llHTTPRequest(url,[ ],"");

with 

fetchid = llHTTPRequest(llEscapeURL(url),[ ],"");

That might work.

Link to comment
Share on other sites

  • 0

Oh, well.  I said it might work.  By the way, I assume that the row of carets in

string baseurl = "http://www.^^^^^^^^^^^^^/petname/";

and again in

string password = "^^^^^^^^";

are just placeholders that you put there to hide the real site URL and password when you posted here, right?  You're replacing them with the real values when you run the script....

Link to comment
Share on other sites

  • 0

Rolig Loon this caracter ^^^^^^^^^^ is for hide the password sry 

integer systemchan = -111;
integer syslis;
string baseurl = "http://www.ghostbreedable.co.uk/petname/";
string filename = "Breedable_Pet_Breed_Genes.php";
string password = "Test";
string method = "breedpetdetailsSEX";

Link to comment
Share on other sites

  • 0

Same boat.

I have a perfectly formed URL that uses an IP address for the hostname.  If I llOwnerSay() the URL i can click on it in local and bring up the page.  That same string passed to llHTTPRequest generates an error " URL passed to llHTTPRequest is not valid".

It so happens I have 2 IPs pointing to the same server.  I can use the other address and it doesn't complain.

Again, the URL with either/both IPs work fine with curl or in a browser address bar and gets the data.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 872 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...