Self Destruct Letter Script | Fun Easy Mobile Friendly

Config.php File

Now you need to connect to your database. Use this file for that purpose. Make sure you change the database name, user and password to match your database.

<?php
define('DB_NAME', 'selfdestructletters');
define('DB_USER', 'DATABASEUSERNAME');
define('DB_PASSWORD', 'DATABASEPASSWORD');
define('DB_HOST', 'localhost');
$con = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);    
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }else{
  if(!empty ($_GET['user'])){
    $urlll =$_GET['user'];
    }else{
    echo '';
    }
  } ?>

Index.php File

This is the index file. Place it on your server. This is the first page everyone will see on your website.

<?php include_once('config.php');
include_once('functions.php'); 
head(); ?>
<body>
<div class="container-fluid sdll">
 <h1>Self Destruct Letters.com</h1>
<p id="tagline" class="large"></p>
 <div class="row">
<center><?php write(); ?></center>
<div class="a2a_kit a2a_kit_size_32 a2a_default_style social">
<a class="a2a_dd" href="https://www.addtoany.com/share"></a>
<a class="a2a_button_facebook"></a>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_google_plus"></a>
<a class="a2a_button_email"></a>
<a class="a2a_button_google_gmail"></a>
<a class="a2a_button_wordpress"></a>
<a class="a2a_button_aim"></a>
</div>
<script async src="https://static.addtoany.com/menu/page.js"></script>
</div>
</div>
<script>
var myString = 'Some things do not need to be repeated! Send a letter that destroys itself after its read.';
var myArray = myString.split("");
var loopTimer;
function frameLooper() {
  if(myArray.length > 0) {
document.getElementById("tagline").innerHTML += myArray.shift();
  } else {
    clearTimeout(loopTimer); 
                return false;
  }
  loopTimer = setTimeout('frameLooper()',70);
}
frameLooper();
</script>
<?php foot(); $con->close();?>

Letter.php File

This is the letter.php file. This is where people will read the letters.

<?php include_once('functions.php'); include_once('config.php'); 
head(); $time=timeout();?>
<body onload="setTimeout(myFunction, <?php echo $time; ?>);">
<div id="sdl"></div>
<div id="message">This Letter Has Self Destructed!If you would like to create one <a href="index.php">click here</a></div>
<?php $var=theletter(); 
$varr=str_replace("'", "\'", $var);

$varr = str_replace(array("\r\n", "\r"), "\n", $varr);
$lines = explode("\n", $varr);
$new_lines = array();

foreach ($lines as $i => $line) {
    if(!empty($line))
        $new_lines[] = trim($line);
}

?>
<script>
var myString = '<?php echo implode($new_lines); ?>';
var myArray = myString.split("");
var loopTimer;
function frameLooper() {
  if(myArray.length > 0) {
document.getElementById("sdl").innerHTML += myArray.shift();
  } else {
    clearTimeout(loopTimer); 
                return false;
  }
  loopTimer = setTimeout('frameLooper()',70);
}
frameLooper();
</script>
</body>
</html>

Only cool people share!

Self Destruct Letter Script | Fun Easy Mobile Friendly was last modified: March 14th, 2023 by Maximus Mccullough
Summary
Self Destruct Letter Script
Article Name
Self Destruct Letter Script
Description
This self destruct letter script is fun, fast and mobile friendly. All you have to do is download it and upload it to your server.
Author
Publisher
A1WEBSITEPRO LLC
Logo
Self Destruct Letter Script

Pages:Previous 1 2 3 4 Next

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.