{"id":15571860,"url":"https://github.com/hatamiarash7/phonebook","last_synced_at":"2026-03-05T23:13:57.848Z","repository":{"id":73239749,"uuid":"116017022","full_name":"hatamiarash7/PhoneBook","owner":"hatamiarash7","description":"Contact manager - PHP","archived":false,"fork":false,"pushed_at":"2023-12-15T08:44:58.000Z","size":586,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T00:43:43.179Z","etag":null,"topics":["bootstrap","contacts","php","php7"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hatamiarash7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-02T13:17:35.000Z","updated_at":"2024-06-07T10:05:34.000Z","dependencies_parsed_at":"2025-03-07T00:31:35.616Z","dependency_job_id":"847e897e-4cb2-4033-a4ff-264715a94c89","html_url":"https://github.com/hatamiarash7/PhoneBook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hatamiarash7/PhoneBook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FPhoneBook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FPhoneBook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FPhoneBook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FPhoneBook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatamiarash7","download_url":"https://codeload.github.com/hatamiarash7/PhoneBook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FPhoneBook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30154488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","contacts","php","php7"],"created_at":"2024-10-02T18:01:11.392Z","updated_at":"2026-03-05T23:13:57.820Z","avatar_url":"https://github.com/hatamiarash7.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP-Login\n=========\n\nA simple, secure system with PHP, MySQL and jQuery (AJAX) using Bootstrap 3 for the form design a phone book.\n\n\n## Installation\n### Clone the Repository\n    $ git clone https://github.com/hatamiarash7/PhoneBook\n\n### Creating the MySQL Database\n\nCreate database \"login\" and create tables \"members\" and \"loginAttempts\" and \"contacts\" :\n\n```sql\nCREATE TABLE IF NOT EXISTS contacts (\n  id           INT(11)      NOT NULL             AUTO_INCREMENT,\n  unique_id    VARCHAR(100) NOT NULL PRIMARY KEY,\n  fname        VARCHAR(100) NOT NULL,\n  lname        VARCHAR(100) NOT NULL,\n  phone_home   VARCHAR(100) NULL,\n  phone_work   VARCHAR(100) NULL,\n  phone_mobile VARCHAR(100) NULL,\n  job          VARCHAR(100) NULL,\n  email        VARCHAR(100) NULL,\n  address_work TEXT         NULL,\n  address_home TEXT         NULL,\n  birthday     DATE         NULL,\n  UNIQUE KEY unique_id (unique_id),\n  UNIQUE KEY email (email),\n  UNIQUE KEY id (id)\n)\n  CHARACTER SET utf8\n  COLLATE utf8_unicode_ci;\n\nCREATE TABLE `members` (\n  `id`            CHAR(23)    NOT NULL,\n  `username`      VARCHAR(65) NOT NULL DEFAULT '',\n  `password`      VARCHAR(65) NOT NULL DEFAULT '',\n  `email`         VARCHAR(65) NOT NULL,\n  `verified`      TINYINT(1)  NOT NULL DEFAULT '0',\n  `mod_timestamp` TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `username_UNIQUE` (`username`),\n  UNIQUE KEY `id_UNIQUE` (`id`),\n  UNIQUE KEY `email_UNIQUE` (`email`)\n)\n  ENGINE = InnoDB\n  DEFAULT CHARSET = utf8;\n\nCREATE TABLE `loginAttempts` (\n  `IP`        VARCHAR(20) NOT NULL,\n  `Attempts`  INT(11)     NOT NULL,\n  `LastLogin` DATETIME    NOT NULL,\n  `Username`  VARCHAR(65)          DEFAULT NULL,\n  `ID`        INT(11)     NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (`ID`)\n)\n  ENGINE = InnoDB\n  DEFAULT CHARSET = utf8;\n```\n### Setup the `login/dbconf.php` file\n```php\n\u003c?php\n    //DATABASE CONNECTION VARIABLES\n    $host = \"localhost\"; // Host name\n    $username = \"user\"; // Mysql username\n    $password = \"password\"; // Mysql password\n    $db_name = \"login\"; // Database name\n\n```\n\n### Setup the `login/config.php` file\n\u003ci\u003eRead code comments for a description of each variable\u003c/i\u003e\n\n```php\n\u003c?php\n    //Set this for global site use\n    $site_name = 'Test Site';\n\n    //Maximum Login Attempts\n    $max_attempts = 5;\n    //Timeout (in seconds) after max attempts are reached\n    $login_timeout = 300;\n\n    //ONLY set this if you want a moderator to verify users and not the users themselves, otherwise leave blank or comment out\n    $admin_email = '';\n\n    //EMAIL SETTINGS\n    //SEND TEST EMAILS THROUGH FORM TO https://www.mail-tester.com GENERATED ADDRESS FOR SPAM SCORE\n    $from_email = 'youremail@domain.com'; //Webmaster email\n    $from_name = 'Test Email'; //\"From name\" displayed on email\n\n    //Find specific server settings at https://www.arclab.com/en/kb/email/list-of-smtp-and-pop3-servers-mailserver-list.html\n    $mailServerType = 'smtp';\n    //IF $mailServerType = 'smtp'\n    $smtp_server = 'smtp.mail.domain.com';\n    $smtp_user = 'youremail@domain.com';\n    $smtp_pw = 'yourEmailPassword';\n    $smtp_port = 465; //465 for ssl, 587 for tls, 25 for other\n    $smtp_security = 'ssl';//ssl, tls or ''\n\n    //HTML Messages shown before URL in emails (the more\n    $verifymsg = 'Click this link to verify your new account!'; //Verify email message\n    $active_email = 'Your new account is now active! Click this link to log in!';//Active email message\n    //LOGIN FORM RESPONSE MESSAGES/ERRORS\n    $signupthanks = 'Thank you for signing up! You will receive an email shortly confirming the verification of your account.';\n    $activemsg = 'Your account has been verified! You may now login at \u003cbr\u003e\u003ca href=\"'.$signin_url.'\"\u003e'.$signin_url.'\u003c/a\u003e';\n\n    //IGNORE CODE BELOW THIS\n```\n### Place this code (from `index.php`) at the head of each page :\n\u003e *** **Important** *** Checks to see if username $_SESSION variable is set. If not set, redirects to login page. \n\n```php\n\u003c?php require \"login/loginheader.php\"; ?\u003e\n```\n\n### Check the Username and the Password using jQuery (Ajax) :\n\nIf the user has the right username and password, then the `checklogin.php` will send 'true', register the username and the password in a session, and redirect to `index.php`.\nIf the username and/or the password are wrong the `checklogin.php` will send \"Wrong Username or Password\".\n\n\n### Signup/Login Workflow:\n\u003e 1) Create new user using `signup.php` form\n\u003e (note: validation occurs both client and server side)\n\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003cb\u003eValidation requires: \u003c/b\u003e\n\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; - Passwords to match and be at least 4 characters\n\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; - Valid email address\n\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; - Unique username\n\u003e 2) Password gets hashed and new GUID is generated for User ID\n\u003e 3) User gets added to database as unverified\n\u003e 4) Email is sent to user email (or $admin_email if set) with verification link\n\u003e 5) User (or admin) clicks verification link which sends them to `verifyuser.php` and verifies user in the database\n\u003e 6) Verified user may now log in\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatamiarash7%2Fphonebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatamiarash7%2Fphonebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatamiarash7%2Fphonebook/lists"}