Updates to the API functionality.

Reworked the API to handle variable number of pages. Added function to
compare the extracted titles for each page, which utilizes the
array_intersect() function for comparisons. Currently I have it printing
out the resulting array of common links.

TODO: work on the main page to get it calling this API.