Location: PHPKode > scripts > user-agents.org > index.php
<?php
	include 'data/class.user-agents.org.php';
	$rbt = new  User_Agents_dot_org(); 
if(isset($_GET[savexml])){
	$rbt->Save('xml');
}
if(isset($_GET[savesql])){
	include 'data/sql.php';
	GetMyConnection();
	$rbt->User_Agents_Dot_Org();
	$agents = array();
foreach ($rbt->User_Agents_XML as $i =>  $k) {
	$agents[id] = $k->ID;
	$agents[string] = addslashes($k->String);
	$agents[description] = addslashes($k->Description);
	$agents[type] = $k->Type;
	$agents[comment] = addslashes($k->Comment);
	$agents[link1] = addslashes($k->Link1);
	$agents[link2] = addslashes($k->Link2);
	$rbt->Save('sql', $agents);
	}
}
if(isset($_GET[agents])){
	$rbt->User_Agents_Dot_Org();
foreach ($rbt->User_Agents_XML as $i =>  $k) {
	echo '['.$i.'] - '.$k->ID.' - '.$k->String.' - '.$k->Description.' - '.$k->Type.' - '.$k->Comment.' - '.$k->Link1.' - '.$k->Link2.'<br />';
}
}

?>
Return current item: user-agents.org