Title: RE: Renewal Script

Generate a list of domains one per line and put them in a file called domainlist.txt.  Then try this from command line after using a minor mod to his script, which I've pasted below with my changes and calling in renew.pl...


bash<ENTER>
for x in `cat domainlist.txt` <ENTER>
do<ENTER>
./renew.pl $x<ENTER>
done<ENTER>


#!/usr/bin/perl

BEGIN {
    do "/path/to/your/OpenSRS.conf";
}

use strict;
use lib $PATH_LIB;
use OpenSRS::XML_Client qw(:default);
my $XML_Client;
$XML_Client = new OpenSRS::XML_Client(%OPENSRS);
$XML_Client->login;
my $domain = $ARGV[0];
chomp($domain);
my $no_years = "1";

print "Registering $x for $no_years year.....";

my $xcp_req = {
        action => 'renew',
        object => 'domain',
        attributes => {
        domain => "$domain",
        currentexpirationyear => "2001",
        period => "$no_years",
        auto_renew => "off",
        },
};

my $res = $XML_Client->send_cmd( $xcp_req );
my $response = $res->{ response_text };

print "\n\n";

if (not $res->{is_success}) {
        print "Renewal Failed: $response\n";
} else {
        print "Renewal Succeded!\n";
}

$XML_Client->logout;




-----Original Message-----
From: Charles Daminato [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 12:48 PM
To: Alex Brecher; [EMAIL PROTECTED]
Subject: RE: Renewal Script


Well, I'm no programmer, BUT you could do something with it...

Say, make an array of @domain and @no_years, then for each element in the
array extract $domain[x], $no_year[x] (I don't even know if my syntax is
correct!), and pass that through the "send_cmd" part (maybe even loop the
"sending command to server for $domain, $no_years")

Wouldn't take too much to modify, be sure you *cough* test it first!

Assuming you know Perl, but I'm sure some smart-dude on this list could whip
it up in about 5 minutes (most of the beef is already there).

I *could* get it done, but it would take me a couple of hours trouble
shooting, referring to a Perl book for arrays (I'm horrible with arrays, I
just don't know why), and testing it a few times.  Can you wait until I have
some spare time, say... August? ;)

Charles Daminato
OpenSRS Product Manager
Tucows Inc. - [EMAIL PROTECTED]

> -----Original Message-----
> From: Alex Brecher [mailto:[EMAIL PROTECTED]]
> Sent: June 22, 2001 3:34 PM
> To: Charles Daminato; [EMAIL PROTECTED]
> Subject: Re: Renewal Script
>
>
> Thank you for the script! That script is not really what we
> needed since it does renewals one at a time. Can it be edited to do bulk
> renewals ?
>
> Best Regards,
>
> Alex Brecher
>
> Visit us at http://www.Successfulhosting.com
> We'll make your web site a success!
>
> Get your own domain name for only $14.99
> http://www.DiscountDomainRegistry.com
>
> *****PLEASE DO NOT DELETE ANY PART OF THIS MESSAGE WHEN REPLYING*****
> ----- Original Message -----
> From: "Charles Daminato" <[EMAIL PROTECTED]>
> To: "Alex Brecher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, June 22, 2001 2:51 PM
> Subject: RE: Renewal Script
>
>
> > (Thank you William X. Walsh)
> >
> > http://www.userfriendly.com/renew.txt
> >
> > Modify as you see fit, caveat emptor - you don't need profile
> info, just the
> > domain and your own Reseller account (and adequate funds, of course)
> >
> > Charles Daminato
> > OpenSRS Product Manager
> > Tucows Inc. - [EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > > Behalf Of Alex Brecher
> > > Sent: June 22, 2001 2:23 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Renewal Script
> > > Importance: High
> > >
> > >
> > > We need to have a script TODAY that will allow us to enter a
> > > large amount of domains into a form to renew many domains at once. The
> > > script will not need any credit card integration, we just need it
> > > for our own bulk renewal purposes. If you have a script like this
> > > that you can share or if you can write this script today please
> > > contact us ASAP!
> > >
> > > Best Regards,
> > >
> > > Alex Brecher
> > >
> > > Visit us at http://www.Successfulhosting.com
> > > We'll make your web site a success!
> > >
> > > Get your own domain name for only $14.99
> > > http://www.DiscountDomainRegistry.com
> > >
> > > *****PLEASE DO NOT DELETE ANY PART OF THIS MESSAGE WHEN REPLYING*****
> > >
> >
>

Reply via email to