Jump to content

How to disable auto renew?


HostinPK

Recommended Posts

Look in General Settings, "Domains" for the "Default Auto Renewal Setting" for the default setting. I had a similar problem so I wrote a small script to make sure all domains were set to not automatically renew. I also modified the template that showed the domain name so the user would not see an option to renew a domain.

 

I put the following in a .php file then call it once a day as a cron job just to make sure that domains are never set to auto renew.

 

$db_host = "localhost";
$db_username = "username";
$db_password = "password";
$db_name = "dbname";

$link = mysql_connect($db_host, $db_username ,$db_password) or die("Unable to connect to database: " . mysql_error());
@mysql_select_db($db_name) or die( "Unable to select database");

$query = "UPDATE tbldomains SET donotrenew = 'on'";
// Perform Query
$result = mysql_query($query);
       // debugging code can go here
mysql_free_result($result);
mysql_close($link);
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.your-domain-name.com");

Hope this helps.

Roger

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated