Skip to content

Instantly share code, notes, and snippets.

Last active August 6, 2016 15:51
What would you like to do?
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 */
$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('','index.html');//pulls index.html and places it into root directory.
//rename('.htaccess','.htaccess.bak'); //renames older htacccess to htacess.bak
//copy('','.htaccess'); //pulls newer htacess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment