Documentation on the structure of the return element written by : Abhishek Nagraj. April 4, 2008. How to Use the files provided There are 2 files along with this readme. The first rapleaf_personlib.php is the actual PHP library to use. The second, rapleaf_main.php demonstrates, very simply, how the library can be used. Note that you will need the cURL-PHP plugin installed, along with PHP and a web server to make this work. How to write a simple PHP scirpt to make use of the Library. Step 1. Initializing the profile element with the api_key. You can obtain an API key from rapleaf.com Using this API key, initialize the $profile variable as $profile = new RapleafProfile($_POST['api_key']); Step 2. Obtain profile details given an email ID Using the object created in step 1, use the getData function with the email ID to get results. $result = $profile->getData($_POST['email']); Note that this library does not support a partial key-based return. Step 3. Obtain/ Reference required data as follows. There are 4 main parts to the $result array $result['basics'] $result['memberships-primary'] $result['memberships-supplemental'] $result['reputation'] These contain more information which can be referenced as follows BASICS $result['basics']['name'] $result['basics']['age'] $result['basics']['location] $result['basics']['gender'] $result['basics']['earliest_known_activity'] $result['basics']['latest_known_activity'] $result['basics']['num_friends'] $result['basics']['universities'][] this will be an array of universities listed by serial $result['basics']['occupations'][] this is another array. It has two keys $result['basics']['universities'][]['job_title'] $result['basics']['universities'][]['company'] Note that these details are in pairs and the right job title will be listed alongside the right company. PRIMARY MEMBERSHIPS $result['memberships-primary'][] this is an array of primary memberships. Keys are $result['memberships-primary'][]['site'] $result['memberships-primary'][]['exists'] $result['memberships-primary'][]['profile_url'] Note that profile_url can be null. This library can deal with changes in the API if more sites are added. SUPPLEMENTAL MEMBERSHIPS $result['memberships-supplemental'][] this is an array of primary memberships. Keys are $result['memberships-supplemental'][]['site'] $result['memberships-supplemental'][]['exists'] $result['memberships-supplemental'][]['profile_url'] Note that profile_url can be null. This library can deal with changes in the API if more sites are added. Also note that the API specification only lists sites which return true on 'exists'. Hence this library will also return just the 'true' sites. REPUTATION $result['reputation'] is the array containing the reputation details. $result['reputation']['score']; $result['reputation']['commerce_score']; $result['reputation']['percent_positive']; $result['reputation']['rapleaf_profile_url']; $result['reputation']['badges'][]; this is an array of badge urls to image paths. This library is released under GPL v2. Do whatever you want with it!