How to Make Your Own 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)
Click on public_html, it’s there where you’re gonna upload your files, then click Upload
When you click on Upload you’ll see something like that
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
Then you’ll see a page like this but instead of “shared” you’re gonna see your control panel username
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
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
You’ll have a page like this, fill the blanks and save
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 ;
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
















Very nice article :)
I started developing my first facemash sites like this, I then went on to build a WordPress plugin for this which makes it extra easy to have facemash running on your website.
http://www.picsmashplugin.com/
It’s a steal at $10 and adds to it lots of viral sharing that Zuckerberg didn’t have the use of back in the days of facemash.
Please do check it out :) it’s a bargain at 10x the price
@Mike @ Picsmash
Nice work, I really liked your plugin.
Just look to how strange life is, you’ve developed a good WordPress plugin of facemash and powered it with lots of sharing tools including the one of Zuckerberg, facebook.
I get these errors, when i try to go to /install_images.php :::
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘a1770765_123′@’localhost’ (using password: YES) in /home/a1770765/public_html/facemash-alike/mysql.php on line 10
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user ‘a1770765′@’localhost’ (using password: NO) in /home/a1770765/public_html/facemash-alike/mysql.php on line 11
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/a1770765/public_html/facemash-alike/mysql.php on line 11
Unable to select database
@Aeip
I fixed the problems above, but i still have these:
Warning: opendir(images) [function.opendir]: failed to open dir: No such file or directory in /home/a1770765/public_html/facemash-alike/install_images.php on line 5
Warning: implode() [function.implode]: Invalid arguments passed in /home/a1770765/public_html/facemash-alike/install_images.php on line 17
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1
@Aeip
Did you add the images folder (where you should put your images) and name it images ?
I put the images folder (named “images”) into the public_html folder, right below the facemash-alike folder.
@Youssef Nassim
Do you know what is wrong? (I am using http://www.000webhost.com to do this)
@Aeip
Well I couldn’t recognize the problem but it should work with 000webhost, however you can take a look on the script author blog here, but I don’t guarantee that he will answer because I haven’t seen any action there quiet a long time.
@Youssef Nassim
Okay. Can you try to make one on 000webhost? (To see what I am doing wrong)
@Youssef Nassim
Hello?
how do u stop the images from duplicating?
@cal
Did you get the site to work? I’m having trouble uploading images. Can you help me?