? user_profile.patch
Index: secondlife.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/secondlife/secondlife.module,v
retrieving revision 1.4.2.3
diff -r1.4.2.3 secondlife.module
320a321,353
> /**
> * 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)<br />\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, '<img alt="profile image" src="http://secondlife.com/app/image/','/1" class="parcelimg" />');
> }
> /**
> * Extracts the user name from the linden user profile
> */
> function secondlife_extract_username($profile_page) {
>   return secondlife_get_data_between($profile_page, '<title>','</title>');
> }
