Integrating into web sites

The tracepack request handler classes are instantiated in your .php scripts that are requested over the web by the client browsers. Then the constructor of handler object figures out the state and generates appropriate HTML for the interaction. For example, having PHPlib Session and Auth subclass definitions (UserSession and UserAuth respectively) in the file mysetup.inc, the most primitive php script would be as follows.

<?php	require ('mysetup.inc');
	page_open(array("sess" => "UserSession",
			"auth" => "UserAuth")); 
 ?>
<HTML>
<HEAD><TITLE>Trace your packages</TITLE>
<BODY>
<?php
	new UserHandler(); 
 ?>
</BODY>
</HTML>
<?php
	page_close(); 
 ?>