LinkedIn Profile API v.1.6 (7.2 KiB, 2,572 hits)

Update 2/23/2011: Version 1.6
LinkedIN Made some changes to it’s public profile pages HTML – thus breaking most of the selectors. This has now been updated. http://icorbin.com/code/linkedin/profile/1.6/

Update 5/1/2010:
I have updated the example to the proper URL http://icorbin.com/code/linkedin/profile/1.5/

UPDATE 4/27/2010:
I have rewritten the LinkedIn Profile Parser to leverage PHP’s DOMDocument. No longer are we reliant on a 3rd party to parse the initial profile html…

Presenting the open source PHP LinkedIn Public Profile API, released under the OSL 3.0

How does it work?
This PHP Class (requires php5) imports a users LinkedIn public profile (by supplying their public profile username) and turns the results in to a simple XML document.

You can see my example at http://icorbin.com/code/linkedin/profile/1.5/

How do you use it?
Inside you will find 3 files.
1. linkedin.php – the actual PHP Class (requires PHP5)
2. profile.php – an example of how to use the Class.
3. livingresume.xsl – the default XSL that is attached to the Users XML Profile.

Usage:

<?
include_once('linkedin.php');
$Profile=new LinkedInProfile('brandoncorbin', 'http://icorbin.com/work/linkedin/livingresume.xsl');
header("Content-Type:application/xml");
echo($Profile->getProfileXML()->asXML());
?>

Questions? Leave them in the Comments and I will reply ASAP.

Disclaimer: I offer absolutely no guarantees that this will work on your system. As a matter of fact, it’s possible that this script could ask you to play “global thermal nuclear war” – if it does, please answer no. We all know what about happened last time.

  LinkedIn Profile API v.1.6 (7.2 KiB, 2,572 hits)