diff -rup secondlife/secondlife.module temp-profile/secondlife/secondlife.module --- secondlife/secondlife.module 2008-12-16 17:05:54.000000000 +0100 +++ temp-profile/secondlife/secondlife.module 2008-12-24 13:44:39.000000000 +0100 @@ -318,3 +318,36 @@ function secondlife_rpc ($channel, $intV // return the response data in an array return array('channel' => $channel, 'string' => $sVal, 'integer' => $iVal); } +/** +* Get the linden user profile +*/ +function secondlife_get_linden_user_profile($user_key) { + $fp = fsockopen("world.secondlife.com", 80, $errno, $errstr, 30); + if (!$fp) { + $result = "$errstr ($errno)
\n"; + } + else { + $out = "GET /resident/".$user_key." HTTP/1.1\r\n"; + $out .= "Host: world.secondlife.com\r\n"; + $out .= "Connection: Close\r\n\r\n"; + fwrite($fp, $out); + $result = ''; + while (!feof($fp)) { + $result .= fgets($fp, 128); + } + fclose($fp); + } + return $result; +} +/** +* Extracts the profile picture key from the linden user profile +*/ +function secondlife_extract_picture_key($profile_page) { + return secondlife_get_data_between($profile_page, 'profile image'); +} +/** +* Extracts the user name from the linden user profile +*/ +function secondlife_extract_username($profile_page) { + return secondlife_get_data_between($profile_page, '',''); +} \ No newline at end of file