Use our Love calculator: Free love percentage calculator, compatibility test, matching by name,
Enter your name and that of your partner ⇒ CALCULATE
Free Online Love Calculator Source Code
Demo : https://www.yttags.com/love-calculator.php
- brand.php
<?php $domainName = "LoveCalculator.com"; $about_site = "100% Accurate Love Calculatorr"; $email = "youremail@gmail.com"; $url = "http://yoursite.com"; ?>
2. index.php
<?php error_reporting(E_ALL); ini_set('display_errors', 1); if (isset($_GET['calculate'])) { $yourName = $_GET['yourName']; $partnerName = $_GET['partnerName']; // Basic love calculation (for demonstration purposes) $loveScore = rand(60, 100); // Construct the URL with parameters $redirectURL = "love.php?score=$loveScore&yourName=$yourName&partnerName=$partnerName"; // Save the names to a file $entryData = "$yourName & $partnerName: Love Score = $loveScore%\n"; file_put_contents('entries.txt', $entryData, FILE_APPEND); // Perform server-side redirection header("Location: $redirectURL"); exit(); } ?> <?php include("./brand.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta name="description" content=""> <meta name="keywords" content=""> <title>Love Calculator</title> <?php include("./head.php"); ?> <link rel="stylesheet" href="style.css"> <style> /* Responsive image styles */ .responsive-img { max-width: 70%; height: auto; display: block; margin: auto; } </style> </head> <body> <?php include("./header.php"); ?> <div class="container"> <h1 style="text-align: center;">?Love Calculator?</h1> <br> <form method="get" action="" class="love-form"> <div class="form-group"> <label for="yourName">Your Name:</label> <input type="text" name="yourName" required> </div> <div class="form-group"> <label for="partnerName">Partner's Name:</label> <input type="text" name="partnerName" required> </div> <button type="submit" name="calculate">Calculate</button> </form> <br> <div class="row"> <p style="text-align: center;">Short Description</p> </div> <!-- ADVERTISEMENT Code --> <!-- Place your advertisement code here --> <!-- ADVERTISEMENT Code --> <!-- Add Your Content --> <div class="row"> <h2 style="text-align: center;">H2 Heading</h2> <p style="text-align: center;">Content text here</p> <!-- Add IMG --> <?php // Replace "path/to/your/image.jpg" with the actual path to your image. $imagePath = "IMGUrl"; ?> <!-- Responsive image with PHP variable --> <img src="<?php echo $imagePath; ?>" alt="Responsive Image" class="responsive-img"> <!-- Add IMG --> </div> <!-- Add Your Content --> <?php include("./footer.php"); ?> </div> </body> </html>
3. header.php
<?php include("analytics.php"); ?> <!DOCTYPE html> <html lang="en"> <head> </head> <body> <header> <nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-4"> <div class="container"> <!-- Logo and brand --> <a class="navbar-brand" href="./"> <img src="./img/fevicon.png" alt="Love Calculator Logo" width="30" height="30" class="d-inline-block align-top"> Love Calculator </a> <!-- Navbar toggle button for mobile --> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <!-- Navbar links --> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav ms-auto"> <li class="nav-item"> <a class="nav-link" href="./">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="./about-us.php">About Us</a> </li> <li class="nav-item"> <a class="nav-link" href="./contact-us.php">Contact</a> </li> <li class="nav-item"> <a class="nav-link" href="./privacy-policy.php">Privacy Policy</a> </li> </ul> </div> </div> </nav> </header> </body> </html> <!-- ADVERTISEMENT HEADER --> <!-- ADVERTISEMENT HEADER -->
4. head.php
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel = "icon" href = "./img/fevicon.png" type = "image/x-icon"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> <!-- In the head section of your HTML --> <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
5. love.php
<?php include("./brand.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <?php include("./head.php"); ?> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Love Calculator Result</title> <link rel="stylesheet" href="style.css"> </head> <body> <?php include("./header.php"); ?> <div class="container"> <h1 style="text-align: center; font-weight: normal;">Love Calculator Result</h1> <div id="result" style="margin-top: 20px; text-align: center;"> <?php if (isset($_GET['score'])) { $loveScore = $_GET['score']; $yourName = isset($_GET['yourName']) ? $_GET['yourName'] : "Your Name"; $partnerName = isset($_GET['partnerName']) ? $_GET['partnerName'] : "Partner's Name"; ?> <p><span style="font-size: 24px; font-weight: bold;">?<?= $yourName ?> & <?= $partnerName ?>?</span></p> <div class="big-heart"> <span class='heart'>❤️</span> <p class="love-score"><?= $loveScore ?>%</p> </div> <p>Together, you create a love story that lasts a lifetime. Your love is a beautiful journey filled with joy, understanding, and endless affection. May your hearts continue to beat as one, and your days be filled with laughter and shared dreams.</p> <?php } else { echo "<p>No love score available.</p>"; } ?> </div> <div class="social-links"> <p>Share your result:</p> <!-- Replace the "#" in the href attributes with your actual social sharing URLs --> <a href="https://www.facebook.com/sharer/sharer.php?u=<?= urlencode("https://trafficridermod.pro/love.php?score=$loveScore&yourName=$yourName&partnerName=$partnerName") ?>" class="social-link facebook" target="_blank">Facebook</a> <a href="https://twitter.com/intent/tweet?url=<?= urlencode("https://trafficridermod.pro/love.php?score=$loveScore&yourName=$yourName&partnerName=$partnerName") ?>" class="social-link twitter" target="_blank">Twitter</a> <a href="https://api.whatsapp.com/send?text=<?= urlencode("Check out my love score: $loveScore%! https://trafficridermod.pro/love.php?score=$loveScore&yourName=$yourName&partnerName=$partnerName") ?>" class="social-link whatsapp" target="_blank">WhatsApp</a> </div> <div> <a class="back-button" href="index.php">Back to Love Calculator</a> </div> <!-- ADVERTISEMENT Code --> <!-- Your advertisement code --> <!-- ADVERTISEMENT Code --> <?php include("./footer.php"); ?> </div> </body> </html>
6. footer.php
<!-- ADVERTISEMENT FOOTER --> <!-- ADVERTISEMENT FOOTER --> <div class="container"> <footer class="py-3 my-4"> <ul class="nav justify-content-center border-bottom pb-3 mb-3"> <li class="nav-item"><a href="./" class="nav-link px-2 text-muted">Home</a></li> <li class="nav-item"><a href="./about-us.php" class="nav-link px-2 text-muted">About Us</a></li> <li class="nav-item"><a href="./contact-us.php" class="nav-link px-2 text-muted">Contact Us</a></li> <li class="nav-item"><a href="./privacy-policy.php" class="nav-link px-2 text-muted">Privacy Policy</a></li> </ul> <p class="text-center text-muted">© <?php echo date('Y') . " " . $domainName; ?></p> </footer> </div>
7. Style.css
.love-form { max-width: 400px; margin: 0 auto; padding: 20px; border-radius: 15px; /* Increased border-radius for a rounded form */ box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); /* Slightly increased box-shadow */ background-color: #fff; transition: transform 0.3s ease-in-out; box-sizing: border-box; } .form-group { margin-bottom: 20px; } label { display: block; font-size: 16px; /* Increased font size */ margin-bottom: 10px; /* Increased margin-bottom */ color: #4CAF50; /* Green color for labels */ } input { width: 100%; padding: 15px; /* Increased padding for input fields */ box-sizing: border-box; border: none; border-bottom: 2px solid #4CAF50; /* Green underline effect */ border-radius: 5px; background-color: #f8f8f8; transition: border-color 0.3s ease-in-out, background-color 0.3s ease-in-out; } input:focus { border-color: #e91e63; /* Pink color on input focus */ background-color: #fff; } button { background-color: #e91e63; /* Pink color for the button */ color: white; padding: 15px 20px; /* Increased padding for the button */ border: none; border-radius: 25px; /* Increased border-radius for a rounded button */ cursor: pointer; transition: background-color 0.3s ease-in-out; } button:hover { background-color: #c2185b; /* Darker pink color on button hover */ } .row { margin-bottom: 20px; } h1, h2 { margin-top: 20px; color: #e91e63; /* Pink color for headings */ } .heart { color: red; font-size: 48px; margin-right: 5px; } /* ... (existing styles) */ /* ... (existing styles) */ .back-button { display: inline-block; /* Use inline-block to make the button only as wide as its content */ margin: 20px auto; /* Center horizontally */ background-color: #e91e63; color: #fff; padding: 10px 20px; text-decoration: none; border-radius: 4px; transition: background-color 0.3s; text-align: center; } .back-button:hover { background-color: #e91e63; } /* Override Bootstrap styles for the back button */ .back-button, .back-button:hover, .back-button:active, .back-button:focus { background-color: #e91e63 !important; /* Important to ensure override */ color: #fff !important; border: none !important; outline: none !important; box-shadow: none !important; } /* Additional style for centering */ /* ... (existing styles) */ .social-links { margin-top: 20px; text-align: center; } .social-link { display: inline-block; margin: 0 10px; padding: 8px 16px; background-color: #3498db; color: #fff; text-decoration: none; border-radius: 4px; transition: background-color 0.3s; } .social-link:hover { background-color: #2980b9; } /* ... (existing styles) */ #result { margin-top: 20px; text-align: center; } .big-heart { position: relative; margin-top: 20px; } .big-heart .heart { font-size: 72px; color: red; } .love-score { font-size: 24px; color: #333; } /* ... (existing styles) */ .container { text-align: center; }
8. aboutus.php
<?php include("./brand.php"); ?> <!DOCTYPE html> <html> <head> <?php include("./head.php"); ?> <title>About Us - <?php echo $domainName; ?></title> <meta name="description" content="About Us - <?php echo $domainName; ?>"> <meta name="keywords" content="About Us - <?php echo $domainName; ?>t"> </head> <body> <?php include("./header.php"); ?> <div class="container"> <div class="row"> <h2>About Us</h2> <p><?php echo $about_site; ?></p> <p>If you have any query regrading Site, Advertisement and any other issue, please feel free to contact at <strong><?php echo $email; ?></strong></p> </div> </div> <?php include("./footer.php"); ?> </body> </html>
9. contactus.php
<?php include("./brand.php"); ?> <!DOCTYPE html> <html> <head> <?php include("./head.php"); ?> <title>Contact Us - <?php echo $domainName; ?></title> <meta name="description" content="Contact Us - <?php echo $domainName; ?>"> <meta name="keywords" content="Contact Us - <?php echo $domainName; ?>"> </head> <body> <?php include("./header.php"); ?> <div class="container"> <div class="row"> <h2>Contact Us</h2> <p>If you have any query regrading Site, Advertisement and any other issue, please feel free to contact at <strong><?php echo $email; ?></strong></p> </div> </div> <?php include("./footer.php"); ?> </body> </html>