Skip to content

Instantly share code, notes, and snippets.

@saiftheboss7 saiftheboss7/suspend.php
Last active Aug 6, 2016

Embed
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 */
<?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
You can’t perform that action at this time.