PHP Classes

PHP Twitter Clone: Social network application similar to Twitter

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 86 All time: 10,018 This week: 43Up
Version License PHP version Categories
twitter-clone 1.0.0MIT/X Consortium ...5PHP 5, Social Networking
Description 

Author

This package implements a social network application similar to Twitter.

It implements a Web application that allows users to register and post text content for others to view.

Currently, it implements several actions to manage users and posts content:

- Register new user

- Login a user

- Insert a new user post

- List user posts

- Delete user posts

Picture of Stefan Ninic
Name: Stefan Ninic is available for providing paid consulting. Contact Stefan Ninic .
Classes: 8 packages by
Country: Bosnia and Herzegovina Bosnia and Herzegovina
Age: ???
All time rank: 37717 in Bosnia and Herzegovina Bosnia and Herzegovina
Week rank: 180 Up2 in Bosnia and Herzegovina Bosnia and Herzegovina Up
Innovation award
Innovation award
Nominee: 5x

Example

<?php
use Phalcon\Di\FactoryDefault;

error_reporting(E_ALL);

define('BASE_PATH', dirname(__DIR__));
define('APP_PATH', BASE_PATH . '/app');

try {

   
/**
     * The FactoryDefault Dependency Injector automatically registers
     * the services that provide a full stack framework.
     */
   
$di = new FactoryDefault();

   
/**
     * Handle routes
     */
   
include APP_PATH . '/config/router.php';

   
/**
     * Read services
     */
   
include APP_PATH . '/config/services.php';

   
/**
     * Get config service for use in inline setup below
     */
   
$config = $di->getConfig();

   
/**
     * Include Autoloader
     */
   
include APP_PATH . '/config/loader.php';

   
/**
     * Handle the request
     */
   
$application = new \Phalcon\Mvc\Application($di);

    echo
str_replace(["\n","\r","\t"], '', $application->handle()->getContent());

} catch (\
Exception $e) {
    echo
$e->getMessage() . '<br>';
    echo
'<pre>' . $e->getTraceAsString() . '</pre>';
}


Details

Hexis Twitter Clone

Setup

Required software

  1. Phalcon - __read installation instructions__
  2. GIT - Optional

Installation

If you have setup Phalcon then use GIT to clone this repo to your local environment or download and extract it manually, somewhere where web server can access it.

Second, you have to import twitter.sql to your MySQL server.

Modify app/config/config.php database entry to your needs and according to your database settings.

You should also setup virtual host to your project but that is not required.

Attention

Admin user credentials are admin@twitter.com and temp123. MySQL user credentials are User: twitter, password: temp1234.

Feedback

Please leave comments, suggestions, open issues if you find some bugs and thank you for your time.


  Files folder image Files (36)  
File Role Description
Files folder imageapp (5 directories)
Files folder imagecache (5 files)
Files folder imagepublic (2 files)
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file .htrouter.php Aux. Auxiliary script
Accessible without login HTML file index.html Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file twitter.sql Data Auxiliary data

  Files folder image Files (36)  /  app  
File Role Description
Files folder imageconfig (4 files)
Files folder imagecontrollers (6 files)
Files folder imagelibrary (2 directories)
Files folder imagemodels (2 directories)
Files folder imageviews (1 file, 2 directories)

  Files folder image Files (36)  /  app  /  config  
File Role Description
  Accessible without login Plain text file config.php Example Example script
  Accessible without login Plain text file loader.php Example Example script
  Accessible without login Plain text file router.php Example Example script
  Plain text file services.php Class Class source

  Files folder image Files (36)  /  app  /  controllers  
File Role Description
  Plain text file ControllerBase.php Class Class source
  Plain text file DeleteController.php Class Class source
  Plain text file IndexController.php Class Class source
  Plain text file InsertController.php Class Class source
  Plain text file LoginController.php Class Class source
  Plain text file RegisterController.php Class Class source

  Files folder image Files (36)  /  app  /  library  
File Role Description
Files folder imageForms (2 files)
Files folder imagehelpers (1 file)

  Files folder image Files (36)  /  app  /  library  /  Forms  
File Role Description
  Plain text file LoginForm.php Class Class source
  Plain text file RegisterForm.php Class Class source

  Files folder image Files (36)  /  app  /  library  /  helpers  
File Role Description
  Plain text file IsUserRegistered.php Class Class source

  Files folder image Files (36)  /  app  /  models  
File Role Description
Files folder imagePosts (1 file, 1 directory)
Files folder imageUsers (1 file, 1 directory)

  Files folder image Files (36)  /  app  /  models  /  Posts  
File Role Description
Files folder imageInterfaces (1 file)
  Plain text file Posts.php Class Class source

  Files folder image Files (36)  /  app  /  models  /  Posts  /  Interfaces  
File Role Description
  Plain text file PostsInterface.php Class Class source

  Files folder image Files (36)  /  app  /  models  /  Users  
File Role Description
Files folder imageInterfaces (1 file)
  Plain text file Users.php Class Class source

  Files folder image Files (36)  /  app  /  models  /  Users  /  Interfaces  
File Role Description
  Plain text file UsersInterface.php Class Class source

  Files folder image Files (36)  /  app  /  views  
File Role Description
Files folder imageindex (1 file)
Files folder imagelayouts (3 directories)
  Accessible without login Plain text file index.volt Data Auxiliary data

  Files folder image Files (36)  /  app  /  views  /  index  
File Role Description
  Accessible without login Plain text file index.volt Data Auxiliary data

  Files folder image Files (36)  /  app  /  views  /  layouts  
File Role Description
Files folder imageerrors (2 files)
Files folder imageforms (2 files)
Files folder imagepartials (1 file)

  Files folder image Files (36)  /  app  /  views  /  layouts  /  errors  
File Role Description
  Accessible without login Plain text file loginError.volt Data Auxiliary data
  Accessible without login Plain text file registerError.volt Data Auxiliary data

  Files folder image Files (36)  /  app  /  views  /  layouts  /  forms  
File Role Description
  Accessible without login Plain text file loginForm.volt Data Auxiliary data
  Accessible without login Plain text file registerForm.volt Data Auxiliary data

  Files folder image Files (36)  /  app  /  views  /  layouts  /  partials  
File Role Description
  Accessible without login Plain text file authForms.volt Data Auxiliary data

  Files folder image Files (36)  /  cache  
File Role Description
  Accessible without login Plain text file _mnt_e40ce98b0ce95...iews_index.volt.php Example Example script
  Accessible without login Plain text file _mnt_e40ce98b0ce95...ndex_index.volt.php Example Example script
  Accessible without login Plain text file _mnt_e40ce98b0ce95..._loginform.volt.php Example Example script
  Accessible without login Plain text file _mnt_e40ce98b0ce95...gisterform.volt.php Example Example script
  Accessible without login Plain text file _mnt_e40ce98b0ce95..._authforms.volt.php Example Example script

  Files folder image Files (36)  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:10,018
This week:43Up