Code Monkey home page Code Monkey logo

love-calculator-prank's Introduction

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


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 Social Media


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

love-calculator-prank's People

Contributors

vanshdevgan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.