Location: PHPKode > scripts > PHP 2 Install > php-2-install/sample1.php
<?PHP
/*
This example generates an installer for the bank in the local server
with the data:

Base name:	LocaBase
User:		root
Paswword:	123
Host:		localhost

E in the remote server with the data:

Base name:	RemoteBase
User:		RemoteUser
Paswword:	RemotePassword
Host:		remote.host.com

--------------------------------------------------------------------------------
Este exemplo gera um instalador para o banco no servidor local com os dados:

Base name:	LocaBase
User:		root
Paswword:	123
Host:		localhost

E no servidor remoto com os dados:

Base name:	RemoteBase
User:		RemoteUser
Paswword:	RemotePassword
Host:		remote.host.com
*/
	include ("./php2install.class.php");
	
	$vgoInstall	 =  new php2install ();
	
	$vgoInstall	 -> setEncodeDbName ("LocaBase");
	$vgoInstall	 -> setEncodeDbHost ("localhost");
	$vgoInstall	 -> setEncodeDbUser ("root");
	$vgoInstall	 -> setEncodeDbPassword ("123");
	
	$vgoInstall	 -> setDecodeDbName ("RemoteBase");
	$vgoInstall	 -> setDecodeDbHost ("remote.host.com");
	$vgoInstall	 -> setDecodeDbUser ("RemoteUser");
	$vgoInstall	 -> setDecodeDbPassword ("RemotePassword");
	
	$vgoInstall	 -> setDecodeDbPath ("./site_out/site.sql.php");
	
	$vgoInstall	 -> encodeDataBase ();
?>
Return current item: PHP 2 Install