Create agentquery.php