<?php
/***************************************************************************************************
*
*   Class:          OpenShortUrl
*   Author:         jasx@inwind.it
*   Plataform:      Php 4.3 or > & MySql 3.22.xx or > & Apache 1.3.2 or > & Mod_rewrite
*   License:        Gpl 2.0 - http://www.gnu.org/licenses/gpl.txt
*   Date:           First release 16-11-2004
*   Version:        0.5.5.091204
*
****************************************************************************************************/

/*
*Features:
*   Creazione ShortUrl in 2 modalit sequenziale o random.
*   Redirect con frame(cloaking url) e senza frame.
*   Redirect full url per tutte le sottopagine (path forwarding)(per disabilitare commentare rewrite).
*   1.125.899.906.842.624 ShortUrl possibili.
*   Password criptata in md5.
*   Creazione shorturl personalizzata
*/

/*
*History:
*   0.2     Aggiunte stats con password criptate in md5.
*   0.3     Supporto https:// e ftp://.
*   0.3.1   Modifiche algoritmo _seq_shorturl().
*   0.3.2   Rilascio code per bbforum e html.
*   0.3.3   Creazione shorturl personalizzata.
*   0.4.1   Nuovo nome classe e metodi.
*	0.5.2	Supporto per varie lingue.
*	0.5.5	Correzione Bugs vari.
*/

/*
* Todo list
*   nel caso di mailto: togliere il redirect in automatico.
*   v2.0    offire servizio come webservices in xml o tramite modulo in perl
*/


/*
*Struttura table:
*
CREATE TABLE openshorturl (
  id int(5) unsigned NOT NULL auto_increment,
  url tinytext NOT NULL,
  shorturl varchar(10) NOT NULL default '',
  data_creazione datetime NOT NULL default '0000-00-00 00:00:00',
  ip varchar(25) NOT NULL default '',
  data_visita datetime NOT NULL default '0000-00-00 00:00:00',
  click int(5) unsigned NOT NULL default '0',
  mask enum('Y','N') NOT NULL default 'N',
  pass varchar(32) NOT NULL default '',
  PRIMARY KEY  (shorturl),
  UNIQUE KEY id_shorturl (id),
  UNIQUE KEY shorturl(shorturl)
) TYPE=MyISAM;
*
*/


/*
*How to use:
All images must be insert into folder images.

in all page insert
include('openshorturl.class.php');
$tiny = new OpenShortUrl();

index.php
echo $tiny = create_shorturl($url,$mask); //create tiny

url.php  ==>xxx.com/grhj/ or   xxx.com/grhj/case.php
$tiny -> find_url($tiny,$page);  //show url
*/

/*
*Tested On:
*	Windows 2003 Server - Apache/1.3.27 - MySQL 4.15-Max - Php 4.3.3
*	Fedora Core 3 - Apache/1.3.33 - MySQL 4.0.20-Standard - Php 4.3.9
*
*	if you have tested OpenShortUrl with other Platform send me at jasx@inwind.it.
*/


/*
*Know Bugs:
*	Find a bugs ? send me at jasx@inwind.it
*/


?>
