Skip to content

Instantly share code, notes, and snippets.

@saiftheboss7
Last active August 6, 2016 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saiftheboss7/dce8d2321387366b42f257bd7ec190fe to your computer and use it in GitHub Desktop.
Save saiftheboss7/dce8d2321387366b42f257bd7ec190fe to your computer and use it in GitHub Desktop.
PHP Script to Automatically Suspend Hosting Accounts
/*
Made by: @saiftheboss7
Job: To automatically suspend accounts at a given time.
Instruction: Run this code via cronjob */
<?php
$date1 = date("Y/m/d"); //this collects current date
$date2 = "2016/08/06"; //this is your desired time when you want to download the html page or want to do the job.
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
if($timestamp1 == $timestamp2){
copy('https://dl.dropboxusercontent.com/u/5417937/Softs/index.html','index.html');//pulls index.html and places it into root directory.
//rename('.htaccess','.htaccess.bak'); //renames older htacccess to htacess.bak
//copy('https://dl.dropboxusercontent.com/u/5417937/Softs/.htaccess','.htaccess'); //pulls newer htacess
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment