i figured it out now by studying plg_jopensim_register, but because i am using the createuser account on robust i had to do a additional step.
i post my testing code here which i copied from the plugin and adjusted to work without joomla for anyone who is interested
<?php
include "open_config/config.php";
function GUID()
{
if (function_exists('com_create_guid') === true)
{
return trim(com_create_guid(), '{}');
}
return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));
}
function CreateUser($ip,$port,$firstname,$lastname,$password,$email,$avatar)
{
$uuid = GUID();
$url = "http://$ip:$port/accounts";
$myvars = "METHOD=createuser&FirstName=$firstname&LastName=$lastname&Password=$password&Email=$email&PrincipalID=$uuid";
$user = $uuid;
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
if (strpos($response,'Failure') !== false) {
echo 'Failed to Create Account';
}
else
{
$new = sprintf("DELETE FROM Avatars WHERE PrincipalID='%s'",
"$user");
$tt = mysql_query($new);
$query2 = sprintf("INSERT INTO Avatars SELECT '%s' AS PrincipalID, Avatars.`Name`, Avatars.`Value` FROM Avatars WHERE Avatars.PrincipalID = '%s'",
"$user",
"$avatar");
$test2 = mysql_query($query2);
$query = sprintf("UPDATE Avatars SET Avatars.`Value` = '%1\$s' WHERE Avatars.PrincipalID = '%1\$s' AND Avatars.`Name` = 'UserID'",
"$user");
$test = mysql_query($query);
echo "User Account $user Resident Created<br>You can now Login";
}
}
?>