PHP classes for data extraction