How to make Facemash

 
Friends you all have seen the movie The Social network. I was very much impressed by it so as a programmer i decided to make Facemash again.

Note: Don't Try to misuse this webapplication i am teching you for eductional purpose only if anything happens i will not be responsible for it

So How to make it

First of all visit Here. Below is the screen shot of that page


Just scroll down and you will see a free hosting tab and click on  "Order Now" tab.



then fill your details in the contact form and click  on "Create My Account"



after signup confirm your email and click on refresh status then click on "C Panel"




Then after that visit  scroll down the page below and click on "File Manager"
When "File Manager" will open it will look like this



Then click on Public.html
When you will open it you will see a button name Upload
click on it and you will see a page like this below




Choose the zip file that you have downloaded above and upload it.


After uploading it just create a new directory by clicking on New Dir button and name it images



after creating it visit Mysql tab in C Panel


Create a database




and after creating it you will get a page like this




Just Copy above information for later use in connecting to database as it will be used by us later


After that visit phpmyadmin




Now click on Enter Php my admin
After that click on sql tab in the sidebar as i have marked in the screen shot below




Paste below lines in the sql query tab


CREATE TABLE IF NOT EXISTS `battles` (
   `battle_id` bigint(20) unsigned NOT NULL auto_increment,
   `winner` bigint(20) unsigned NOT NULL,
   `loser` bigint(20) unsigned NOT NULL,
   PRIMARY KEY  (`battle_id`),
   KEY `winner` (`winner`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;# MySQL returned an empty result set (i.e. zero rows).
 
  CREATE TABLE IF NOT EXISTS `images` (
   `image_id` bigint(20) unsigned NOT NULL auto_increment,
   `filename` varchar(255) NOT NULL,
   `score` int(10) unsigned NOT NULL default '1500',
   `wins` int(10) unsigned NOT NULL default '0',
   `losses` int(10) unsigned NOT NULL default '0',
   PRIMARY KEY  (`image_id`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;# MySQL returned an empty result set (i.e. zero rows).


and click Go

it will give you a message Your SQL query has been executed successfully


after that now its time to connect to database



just click on edit in  your filemanager and open
 mysql.php  and fill the details below that we earlier saved
 during creation of mysqldatabase just do it like i have done it in the screenshot below



and we are done just upload all the images to your images folder and after that click on install_images.php

and it will say images successfully installed then open your domain that you have registered when signuping like my is (http://s2ptech.blogspot.com/) and see the result

Its ready see below screen shot



FRIENDS I HAVE CREATED IT  FOR CARS TO GIVE YOU EXAMPLE OF IT


and last but not the least to check scores who will win visit your phpmyadmin and browse the table you have created there.

0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment