Skip to content
sobadef edited this page Jan 31, 2015 · 1 revision

Welcome to the thefacebook wiki!

thefacebook- clone of thefacebook.com circa 2004

html by Mark Zuckerberg, php by ProfH

html was sourced from the wayback machine and modified to run the new back end.

MySQL Setup:

  • SCHEMA: /create_database.sql
  • CREDENTIALS: /db_connect.php

You will find the following database credentials in db_connect.php

  • $dbhost = "localhost";
  • $dbuser = "thefacebook";
  • $dbpass = "CHOOSE_A_PASSWORD";
  • $dbname = "thefacebook";

Site Setup:

To get the database working, you will have to change the database name in the profile.php document. mysql_select_db("YOUR DATABASE NAME")

Remove .edu registration restriction

To remove the .edu restriction, simply remove the following lines of code in "register_box.php":

// checks if it is a valid and university email address if (!preg_match('/^[a-z0-9_\-]+(\.[_a-z0-9\-]+)*@([_a-z0-9\-]+\.)+edu$/i', $_POST['email'])) { die('You must have a valid and .edu email address to register for an account.'); }