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: 88 All time: 9,993 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 <contact>
Classes: 8 packages by
Country: Bosnia and Herzegovina Bosnia and Herzegovina
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

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:88
This week:0
All time:9,993
This week:43Up