
i have a php script that will parse html page content link and view but i need to know how to store this content in the sqlite3 database any suggestion ?
include_once('simple_html_dom.php'); //PHP Simple HTML DOM Parser library
$html = file_get_html('www.website.com');
// Find all article blocks
foreach($html->find('div.postbody') as $article) {
$item['details'] = $article->find('div.content', 0)->innertext;
$articles[] = $item;
}
print_r($articles);
try {
$db = new SQLite3('db/mysqlitedb.db');
$db->exec// what type of table should i create
$db->exec// how tell db to store html content from $articles
$result = $db->query('SELECT bar FROM gg');
var_dump($result->fetchArray());
/* Close connections to Database */
$db = NULL;
}
catch( PDOException $e )
{
/* Print Error-Messages */
echo $e->getMessage();
}