Hi Cookie, I like your radio script but I cant seem to get song title info from it. Giving me an error with llhttprequest...
I've been fiddling with my own script which will pull Shoutcast v1 song/artist info ok. But V2 I get nothing. I have seen the XML response from this server when using an external web browser, but llhttprequest returns nothing.
Any help from anyone is greatly appreciated. Feel free to reply here, IM me in world, Notecard, whatever you like. (smile)
Thanks!!
.........
Here's 'my' script which I grabbed from somewhere else and edited a bit....
string stream = "http://50.7.69.18/stats?sid=1"; // shoutcast v 2 server
key kSentRequest;
default
{
state_entry()
{
kSentRequest=llHTTPRequest(stream + "/7.html", [HTTP_USER_AGENT, "LSL_Script (Mozilla Compatible)"],""); // save this one
}
http_response (key kRecRequest, integer intStatus, list lstMeta, string strBody)
{
if (kRecRequest == kSentRequest)
{
// debug
llSay(0,"\n\n" + (strBody) + "\n\nthe stream requested are " + stream );
integer start = llSubStringIndex(strBody,"<body>");
integer end = llSubStringIndex(strBody,"</body>");
string a = llGetSubString(strBody,start,end);
llSay(0,"Song details :"+a);
}
}
touch_start(integer total_number)
{
kSentRequest=llHTTPRequest(stream + "/7.html", [HTTP_USER_AGENT, "LSL_Script (Mozilla Compatible)"],"");
}
}