How to fix all requests without editing other scripts FIX 499 ERROR
Create an object with the script shown below;
string yourDomain = "http://example.com/"; // Your main host domain (could also be an IP)
string hostUserAgent = "Mozilla/5.0"; // Your host's PHP Variable: _SERVER["HTTP_USER_AGENT"]
default
{
state_entry()
{
llSetTimerEvent(3600);
}
touch_start(integer a)
{
if(llDetectedKey(0)==llGetOwner()){llHTTPRequest(yourDomain,[HTTP_METHOD,"GET",HTTP_USER_AGENT,hostUserAgent],"");}
}
timer()
{
llHTTPRequest(yourDomain,[HTTP_METHOD,"GET",HTTP_USER_AGENT,hostUserAgent],"");
}
http_response(key id,integer status,list meta,string data)
{
/*
llRegionSay(DEBUG_CHANNEL,"CODE:"+(string)status);
llRegionSay(DEBUG_CHANNEL,"DATA:"+data);
*/
}
}
Keep in mind when your host's user agent as example is
'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0'
Then the string hostUserAgent is 'Mozilla/5.0'
As weird as it seems to look: By executing a valid request every x minutes/hours your host keeps the connection alive for quite a while.
Dexter Morgan (777gr)