howt-to-make-facemash
I’m sure you all have seen “The Social Network”. I was really impressed by it and by the funny idea of Facemash, that’s why I want to help you creating your own one for fun purpose and I’m not responsible if anything happens…I’m just jocking, do whatever you want, rate your school girls if you dare. Rules are made to be broken, as our friend Mark Zuckerberg did in the past.

First of all you should download the script here, then get a web hosting package. There are free ones, just google free hosts. But if you take it seriously I recommend you to get a payed one like bluehost or another, just google it also.

Now you need to upload all files of the script to your host. To do this you should go to your control panel, then enter to File Manager. If your control panel is a cPanel it will look like this (The images I used in this tutorial are all in cPanel. Whatever, it’s easy to find equivalents in other control panels, they are all similar)

File Manager

Click on public_html, it’s there where you’re gonna upload your files, then click Upload

public_html

When you click on Upload you’ll see something like that

Upload

Like this, you’ve uploaded the script. Now you need to create a database and and username an associate them, just visit MySql databases like here

mysql_databases

Then you’ll see a page like this but instead of “shared” you’re gonna see your control panel username

createdatabase

You can create a Database  like “yourusername_facemash” and a MySQL User like “yourusername_yourfirstname” (I  mean by “yourusername” your control panel user name that you’re gonna have when you get your web hosting)

After that, you should add user to database, it’s in the same last page. You just choose the user you’ve created and click Add.

Now you return to your file manager>public_html and unzip the file you’ve uploaded like this

unzipfile

You’ll have a file named “facemash-alike”, you can delete the zip file. Open the new file, click on mysql.php then you will edit it by clicking Edit

editmysqfile

You’ll have a page like this, fill the blanks and save

editmysql

There is another way to do this, before uploading the zip file, unzip it in your computer, then open “mysql.php” file and fill the blank like the image below, after that you’ll zip the folder (facemash-alike) and upload it, this way it’ll be uploaded with the information ready in “mysql.php” file.

Now enter in PhpMyAdmin, you’ll find it in your control panel. After that click on SQL tab, past this code and Execute

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 ;

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 ;

Untitled 24

Finally, create a folder that you’ll name “images” in your File Manager>public_html by click New Folder on the top and we are done, just upload all your images to this folder and visit this URL “http://yourwebsite.com/facemash-alike/install_images.php”, you’ll replace “yourwebsite” by your website name that you’ve registered when signing up in the web hosting. It’ll say “images successfully installed“.

Now open your website and enjoy you own facemash but before you should move all the script files from /public_html/facemash to /public_html. See my Demo.

Related Posts

– Thefacebook HTML Template

– The Facemash Script