Location: PHPKode > scripts > pserver > md5online.php
<?
/**
 * MD5 Online
 *
 * Thiss Class in a example of a Server create using class pserver
 *
 * @package pserver
 * @subpackage pserver.example
 * @author Pedro Vargas (hide@address.com) http://deerme.org
 * @version 0.1
 * @licence GNU General Public License (GPL)
 */

require('pserver.class.php'); 

 
class md5server extends pserver
{
		
	/**
	* Read data on the client
	*/
	
	function readData( $data , $client  )
	{
		$data = trim($data);
		$this->tpl["msg"] = "MD5(".$data.") = '".md5($data)."'\n\r";
	}
	
	/**
	* Write data on the client
	*/
	function writeData( $data , $client)
	{
		@socket_write($client['socket'], $this->tpl["msg"]  );
	}
	
	
	
}


$server = new md5server('0','10066');
$server->msg_welcome = "Welcome to the MD5 Online \n\r";
$server->start();

?>
Return current item: pserver