Naming Service
| Remote User Naming Service | |
|
The Remote User Naming Service is to allow Mensa Websites to personalize their content. Websites that use the Auth Service can get member names using this service and provide a more personal interface to the users. The naming service is invoked by calling one of the naming files : http://indianmensa.org/db/services/naming/naming.php or http://indianmensa.org/db/services/naming/namingXML.php.
Example
To find the name of a user with the Membership No (The Membership No, uniquely identifying each user) 11000012, you will make a call as follows : The resulting page is a plain text file with 3 lines. The first line is the firstname, the second line the middle name and the third line the last name. If the member does not exist, it does not give any error but the 3 lines are blank. The file http://indianmensa.org/db/services/naming/namingXML.php returns the same output but parses it as XML. How to use these files to get a Member's name. Getting Member's names with the help of these files is simple. You can write a funtion that calls this page and read its output.
Code Example
Say you are using PHP, your function would be as follows. <?php This was merely an example using the plain text file. If you wish to you can use the XML file namingXML.php. The GET parameters remain the same only the output format differs. The XML file can be used with PHP's XML functions or for that matter with any other language that supports reading XML. The main reason for including the XML file was to support future projects that may incorporate AJAX.
Example AJAX Implementation (using namingXML.php)
Membership No : |
|








