Character
Version 1 (vl, 04/09/2009 07:13 pm)
1 | 1 | vl | h1. Character |
---|---|---|---|
2 | 1 | vl | |
3 | 1 | vl | h2. Base URL |
4 | 1 | vl | |
5 | 1 | vl | http://atys.ryzom.com/characters/index.php |
6 | 1 | vl | |
7 | 1 | vl | h2. Syntax |
8 | 1 | vl | |
9 | 1 | vl | * _uid_: the user id |
10 | 1 | vl | * _slotid_: the character slot of the user (0 is the first character, 4 is the last character) |
11 | 1 | vl | |
12 | 1 | vl | h2. Errors |
13 | 1 | vl | |
14 | 1 | vl | * "Error 4" often means that the slot is empty (no character) |
15 | 1 | vl | |
16 | 1 | vl | h2. PHP Example |
17 | 1 | vl | |
18 | 1 | vl | <pre> |
19 | 1 | vl | <? |
20 | 1 | vl | $xml = simplexml_load_file('http://atys.ryzom.com/characters/index.php?uid=65&slotid=1'); |
21 | 1 | vl | echo "Name: ".$xml->name; |
22 | 1 | vl | ?> |
23 | 1 | vl | </pre> |
24 | 1 | vl | |
25 | 1 | vl | will display the name of the second character of the user id 65: |
26 | 1 | vl | |
27 | 1 | vl | <pre> |
28 | 1 | vl | Name: Dday |
29 | 1 | vl | </pre> |
30 | 1 | vl | |
31 | 1 | vl | h2. Real Examples |