Some time ago, I’ve decided to centralize my resume information in one place, to avoid having to update it on several places every time I changed anything in it.
I’ve decided to use the LinkedIn interface to update it, as it allows resumes in different languages (my profile in French and in English).
To retrieve my resume information from my LinkedIn profile, I’ve created a PHP script to scrape the webpage and compile the result in an XML file.
The resulting file has the following format:
<?xml version="1.0" encoding="UTF-8"?> <resume> <position> <title>position title</title> <company>company</company> <location>location</location> <from>from date</from> <to>to date</to> <description>description</description> </position> <position> ... </position> </resume>
Then I can use this file as a source data in other webpages (like my personal homepage).
This script uses the Simple HTML DOM library to parse the HTML source from the webpage.
The script is in the
linkedin.php file, and needs the library in
To run it, just call
scrapeResume($resume_url, $dest_file), which will create or replace the file
$dest_file with the XML scraping of the resume at
Now I could create a custom and lightweight XML marshaller and unmarshaller, to simplify the XML operations.
The sources can be found on GitHub, and you can directly download the sources as a Zip File or a TAR Ball. You can also simply clone the repository with Git by running:
$ git clone https://github.com/RemyG/PHPScripts.git