Installation

What is it ?

Url Shortener is a free PHP / Mysql script buid with CodeIgniter 3.

Download :

Download Url Shortener v0.1

Installation :

1. Upload files on your server

2. Edit application/config/config.php file :

            
                $config['base_url'] = 'http://your-website.com';
        

3. Edit application/config/database.php file (line 78) :

            
                'hostname' => 'your-host',
                'username' => 'your-username',
                'password' => 'your-password',
                'database' => 'your-database',
        

4. Upload Database

Upload application/install/database.sql file or execute this following sql request.

            
            CREATE TABLE `url_ci_expander` (
              `id_url` int(11) NOT NULL,
              `short_url` varchar(255) NOT NULL,
              `long_url` varchar(255) NOT NULL,
              `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            CREATE TABLE `url_ci_shortener` (
              `id_url` int(11) NOT NULL,
              `short_code` varchar(10) NOT NULL,
              `url` text NOT NULL,
              `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            ALTER TABLE `url_ci_expander`
              ADD PRIMARY KEY (`id_url`);

            ALTER TABLE `url_ci_shortener`
              ADD PRIMARY KEY (`id_url`);

            ALTER TABLE `url_ci_expander`
              MODIFY `id_url` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

            ALTER TABLE `url_ci_shortener`
              MODIFY `id_url` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;