The PHP extension for DB2 may be used to establish connection with DB2 database and run SQL queries as explained in following tutorial.

http://www.regdeveloper.co.uk/2006/08/09/db2_udb_part2/