Skip to content

lyricsjoker/love-calculator-prank

 
 

Repository files navigation

love-calculator-prank

The Name Of The Project Is Love Calculator Prank It is Written in PHP By Me It is basically clone of https://quiz.playing.com i have taken the frontend from there site and implemented the backend in core php using the basic or advance php skills i know

How It Works - Tried To Explain How This PHP SCRIPT WORK

1-When User Enter His Her Name In Input Field There Is Two Hidden Input Field Which Has Randomly Genrated Value I Call This Value Known As secretid and userid when user submits the data got inserted into db in the corresponding column with name , secretid ,userid .
2- After Submiting The Data In DB The Page sends the get request to https://example.com/index.php?userid=genrateduserid now it's an intresting page this page has two views
    2.1 authorized view
    2.2 unauthroized view

3-The Cookie Has Also Been Created With The Values Of secretid and userid to differntiate in these views a person having these cookies gonna have authorized view as long as they have cookie in there browser also the page renders a shortlink which users can share with there friends the shortlink has been created using an third party api the api uses $finalurl.'?'.$_COOKIE['userid'] these variables to create short link
4-When User Share The Link & Victim Visits The Link Name Of Ther Person(WHo Created The Link) Will Be Reflected (Because Of Get Paramterer In User Id)In Unauthroized View Where Vicitm Can ENter His Crush Name & His Name
    5- There Are Three Fields In Total & one submit button
    5.1-Your Name- It Is Visible Field Victim Can Enter His Name
    5.2-Crush Name - It is Visibile Field Victim Can Enter His Crush Name
    5.3-secretid- it is not visible field and it has default value fetched from get paramter in the request by which this unauth page has been rendered and that paramter is userid
    5.4-Calculate Love Button- This Button Sends Data In Another Table Having Two Columns Secretid and message in which every secret id has one corresponding column named messages
5- Now If Authorized Users Go To https://example.com/ the php script checks for cookie if it is there then it redirects to https://example.com/index.php?userid=genrateduserid and there as he is authorized there the messages having secret id he genrated will be rendered hence the Victim Name & Cursh Name Will Be Rendered

Functions Used


1-Cookies & Session
2-Dealing With Database
    2.1 - Storing Data In Database
    2.2 - Fetching Data From Database
    2.3 - Creating Relational Database & Using In Php
3-Authorization & Authentication logic
4-Get & Post Requests
5-API Fetching For Shortlinks
6-MIND (Most Important)

How To Implement the code


Step 1- Simply Upload The Files Onto Server Using FTP
Step 2- Create Database & Import The File db.sql
Step 3- Edit The db.php file and check the connection with db
Step 4- Edit The app.php file and find if there is any url like example.com replace with your site url (Maybe You Have To Change Or Maybe Not The Code May Get Updated Soon)
Step 5- Boom That's It You Setup Your Own Love Calculator


# Screenshots & Overview

Homepage


Authorized User View page


UnAuthorized User View Page


Authorized User View Page With Data


UnAuthorized User Final View Page


Check The Code In Action

Live Url - https://playlovegame.ml/

Any Bugs Or Fixes

Please Contact -
[email protected] (Primary)
[email protected]

Follow Me On your place


Facebook - Vansh Devgan
Twitter - Vansh Devgan
Instagram - Vansh Devgan
Linkedin - Vansh Devgan

About

Love Calculator Prank

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.3%
  • PHP 23.9%
  • Hack 2.8%