<?php

// See the following OnpubAPI tutorial for more info:
// http://onpubco.com/index.php?articleID=76&sectionID=2

// Establish the connection to the Onpub database.
$pdo = new PDO"mysql:host=localhost;dbname=test""test""test" );

// Include the OnpubAPI classes.
include 'onpub/api/onpubapi.php';

// Construct an OnpubArticles object. This represents the OnpubArticles table
// in the database.
$oarticles = new OnpubArticles($pdo);

// Output the number of articles currently stored in the database.
echo $oarticles->count();

?>