I'm just learning php and I play game called secondlife and I'm using XML feed get my online status to a scripted item in game and looking convert this to a Online or Offline but in a GD Image 🙂
Current Code to get the status info.
<?php
require("xmlrpc.inc");
// Only thing you need to edit is the xml channal to the object in game:
$channel = "76a0b79d-060d-f763-9ce8-a62898219a93";
$strValue = "";
$intValue = 0;
$array["Channel"] = $channel;
$array["IntValue"] = $intValue;
$array["StringValue"] = $strValue;
list($success, $response) =
XMLRPC_request('xmlrpc.secondlife.com',
'/cgi-bin/xmlrpc.cgi', 'llRemoteData',
array(XMLRPC_prepare($array)));
print "I am ";
if ($success) {
print $response["StringValue"];
} else {
print "having problems contacting RPC server...";
}
?>
For anyone who cares or intrested this is In game script:

Code:
key avatar;
string online_status; // preserve it
default
{
state_entry()
{
// don't exaggerate, one check per minute
// is more than enough!
llSetTimerEvent(60.0);
llSetTouchText("XML/RPC");
avatar = llGetOwner();
}
timer()
{
// now request agent data for online status
avatar = llGetOwner();
llRequestAgentData(avatar, DATA_ONLINE);
}
dataserver(key queryid, string data)
{
// this is the reply you get inside SL
if (data == "1")
online_status = "online";
else
online_status = "offline";
// hover the text over your object
llSetText(llKey2Name(avatar) + " is "
+ online_status, ZERO_VECTOR, 1.0);
}
touch_start(integer total_number)
{
// reset XML-RPC communications. Only
// the owner can do this, and will
// get a new channel key each time
if (llGetOwner() == llDetectedKey(0))
{
llWhisper(0, "Registering with RPC server...");
llOpenRemoteDataChannel();
}
else llWhisper(0, "Sorry, only" +
llKey2Name(avatar)+
" may set up XML/RPC handler on object");
}
remote_data(integer event_type, key channel,
key message_id, string sender,
integer idata, string sdata)
{
// this is called from the Outside World
llWhisper(0, "Incoming information request...");
if (event_type == REMOTE_DATA_CHANNEL)
{
// as channels change, it's good to
// get it once in a while...
llWhisper(0, "Channel id: "+(string)channel);
// send it to you each time it changes
llEmail("your@email.address",
"New channel id for Online Status handler",
"New channel id is "+(string)channel);
}
if (event_type == REMOTE_DATA_REQUEST)
{
llRemoteDataReply(channel, channel,
online_status, idata);
}
}
}