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

    23 Comments

  1. Pingback: The Facemash Script - Geeksband

  2. 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

  3. Youssef Nassim says:

    @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.

  4. Aeip says:

    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

  5. Aeip says:

    @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

  6. Youssef Nassim says:

    @Aeip
    Did you add the images folder (where you should put your images) and name it images ?

  7. Aeip says:

    I put the images folder (named “images”) into the public_html folder, right below the facemash-alike folder.

  8. Aeip says:

    @Youssef Nassim
    Do you know what is wrong? (I am using http://www.000webhost.com to do this)

  9. Youssef Nassim says:

    @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.

  10. Aeip says:

    @Youssef Nassim
    Okay. Can you try to make one on 000webhost? (To see what I am doing wrong)

  11. Aeip says:

    @Youssef Nassim
    Hello?

  12. cal says:

    how do u stop the images from duplicating?

  13. Aeip says:

    @cal
    Did you get the site to work? I’m having trouble uploading images. Can you help me?

  14. archit says:

    it is giving errrors like Warning: Invalid argument supplied for foreach() in /home/a4032208/public_html/index.php on line 89
    and Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/a4032208/public_html/index.php on line 26 . How to remove them . I have made an image folder and uploaded image in it. If i have an another website how can make it a page of that site.

  15. archit says:

    now errors have gone but its not showing photos

  16. archit says:

    i have made it on http://www.000webhost.com/ . my site is http://sunnynehra.hostzi.com/ . its working all right but not showing photos. please help.

  17. Aeip says:

    I’m also having the same problem

  18. sam says:

    image doesn’t change when click-ed on? what is the error?

  19. Diogo says:

    Why the images dont load? it’s all running, but the images dont load. Anybody with the same problem? Where the error can be?

  20. Diogo says:

    Why the images dont load? it’s all running, but the images dont load. Anybody with the same problem? Where the error can be?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>