.*/ //This function takes the eBooks produced by Drupal views, scraps the page, and returns a jquery mobile friendly page. //include_once('simple_html_dom.php'); //scraperLibrary function loadEbooks(){ $html = file_get_html('http://library.citytech.cuny.edu/research/eBooks/index.php'); $i = 0; $j = 1; foreach($html->find('span[class=field-content] a') as $eBook) { if($i%2==0){ $item['title'] = $html->find('span[class=field-content] a', $i)->plaintext; $item['URL'] = $html->find('span[class=field-content] a', $j)->href; $eBooks[] = $item; } $j++; $i++; } $listBooks = ''; echo $listBooks; } ?>