Hi guys, I have this external library called "simple_html_dom.php" but I don't know how to use it in my phalcon project.
I have this code:
<?php
require 'simple_html_dom.php';
$url = 'https://porrua.mx/busqueda/ebooks/9780545229937';
$html=file_get_html($url); //Devuelve un array con contenido de la página
$posts=$html->find('div[class=contenthover]');
foreach ($posts as $post) {
$link=$post->find('h5',3);
$title=$link->innertext;
echo $title,"\n";
}
?>
Now I want to do the exact same thing in a Controller. But I don't know how to import and use the 'simple_html_dom.php' library inside Phalcon. I guess I just can't use the 'require' command. Can you please point me on how to use this library?
I'm still a beginner with Phalcon so I'm having trouble understanding all of these. Thank you so much for your help!