Skip to content

HongYang01/tmf2234-web-hosting-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Visitors GitHub contributors

TMN2234 (G03) Web Based System Development Assignment

Project: Web Hosting Service

πŸ† Developed By Team: Semicolon

  • 79880 LIM HONG YANG
  • 79065 CHIN TECK YUNG
  • 78855 ANNASTASHA CHANG SEE MAY
  • 79260 EE CHEE FAT
  • 79027 CHAI CHENG KANG

This project is intended strictly for educational purposes. It is important to note that no tangible costs will be accrued. We wish to emphasize that any potential loss or damage to assets cannot be attributed to our accountability. We advise exercising caution and assuming full responsibility when opting to download and install this software.


⚠️ Important Pre-requisite!

This web application must be develop ONLINE, because the belows are implemented:

  1. PayPal Subscription
    • Ask credentials from developer or; use your own client ID & secret
  2. Chart.js

🌐 Deploying Website To Local Machine

Click to expand!

Option 1

  1. Empty your xampp/htdocs/ directory and replace it with all the project files

Option 2

  1. Open XAMPP
  2. Click config (Apache)
  3. Select Apache (httpd.conf)
  4. Search for DocumentRoot, change the directory to your project folder

You will see this (by default):

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">

Change to:

DocumentRoot "path/to/your/project/folder"
<Directory "path/to/your/project/folder">
  1. Save it, restart XAMPP and start Apache and MySQL
  2. Import id20654951_semicolonix.sql to database (assuming no error)
  3. Done, try localhost/index.php

πŸ”‘ Setup Composer for dotenv Environment

Click to expand!
  1. Download Composer.exe (v2.5.8 as of 08-Aug-2023) Video Tutorial
  2. Install as default setting

If missing dotenv folder

  1. Create a dotenv folder
  2. Open vsCode terminal, cd dotenv
  3. type in composer require vlucas/phpdotenv
  4. Will see the package installed: composer.json & composer.lock

☁️ How To Host Website Temporarily Using ngrok (FREE)

Click to expand!
  1. Register ngrok account
  2. Login ngrok aacount
  3. Download ngrok (please remember the download directory)
  4. Run cmd
  5. cd /absolute/path/to/your/ngrok-v3-stable-windows-amd64 (ngrok.exe should be inside)
  6. type ngrok & hit ENTER - check if is correctly install (assuming no error)
  7. Run your XAMPP/WampServer (Start Apache & MySQL)
  8. Goto ngrok Dashboard to get your AuthToken
  9. Go back to cmd
  10. type ngrok config add-authtoken PUT_YOUR_AuthToken_HERE & hit ENTER (only need to do this ONCE)
  11. type ngrok http 80 & hit ENTER (listening port 80, may vary depends on your local server)
  12. You will now see beautiful interface in cmd
  13. Copy the Forwarding link
  14. Paste the link to any browser
  15. to QUIT/Close tunnel: Ctrl + C in cmd

Extra

πŸ” Repeat Step [4], [5], [11-15] if you wish to re-open a tunnel
βœ’οΈ Note: The link will be expired if you choose to close the tunnel (Ctrl + C)
βœ’οΈ How to update ngrok: ngrok udpate

🧾 Generate PDF Receipt using FPDF

Click to expand!
  1. Download the latest fpdf as zip file (v1.85 as of 18-6-2023)
  2. Extract and put in the project directory

πŸ“’ Dummy Data

Click to expand!
hashing method : password_hash("YOUR_PASSWORD", PASSWORD_BCRYPT);
verify method  : password_verify("YOUR_PASSWORD", $hash);
Role Email PWD
ADMIN [email protected] 12356
----- ---------------------- -----------
USER [email protected] 123
USER [email protected] 123
USER [email protected] 123
USER [email protected] 123
USER [email protected] alex456@
USER [email protected] Alicepass
USER [email protected] qwerty789
USER [email protected] emily123
USER [email protected] brown123
USER [email protected] secret456
USER [email protected] password123
USER [email protected] laura524
USER [email protected] mike78900
USER [email protected] sarah456

πŸ’³ PayPal Subscription Integration

Click to expand!

Types of payment

  1. One-time payment/checkout
  2. Recurring Payment (we use this)

Note

Paypal Credentials

Ask from developer

Folder Hierarchy

project/
β”œβ”€β”€ admin/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ font/
β”‚   β”œβ”€β”€ icon/
β”‚   └── image/
β”œβ”€β”€ auth/
β”œβ”€β”€ config/
β”œβ”€β”€ css/
β”œβ”€β”€ dotenv/
β”‚   └── vendor/
β”œβ”€β”€ Error/
β”œβ”€β”€ handlers/
β”œβ”€β”€ includes/
β”œβ”€β”€ js/
β”œβ”€β”€ pages/
β”œβ”€β”€ vendor/
└── index.php

Tips on SQL

  1. Reset auto increment using ALTER TABLE table_name AUTO_INCREMENT = desired_value