[arin-tech-discuss] PHP class to reassign subnets via rest

Thomas St.Pierre tstpierre at iweb.com
Fri Nov 18 14:26:23 EST 2011


I've written a PHP class that sends a simple reassign to Arin. I'm 
releasing it in the hopes others find it useful and that it saves them 
time :) It first checks to see if there's an existing reassign for the 
subnet, and if there is it updates the customer object. Otherwise it 
creates a new Customer, then reassigns the subnet to them. Note there 
are some variables you need to set to get it working (your API-key, etc)

I included an example script that uses the reassign class. This is the 
script I used. It's not documented but it's not that complicated either. 
We had an existing script that pulled customer information out of our 
database and created a separate file for each reassign using the email 
template format. The example script parses the information from these 
files, scrubs any weird characters from the data (Arin really don't like 
accents etc! ) and then does the reassign.

Disclaimer: I'm not a programmer/developer by trade. I did my best to 
document the code I wrote, but the code is probably not the 
cleanest/most portable out there. I got it to the point that it was 
working for what I needed, and stopped there. Also, appologies if I got 
the licensing/copyright stuff wrong, I've never really released code 
before, so this is all new to me. :)

A note to Arin: It would be nice if there was a restful whois interface 
for the beta site. I looked but couldn't see one. :)

Here's the file: http://samoht.ca/reassign.class.tar.gz



Thomas St.Pierre
Network Administrator
iWeb Technologies
Email : tstpierre at iweb.com
Web : www.iweb.com
Tel : 514-286-4242 ext 2212

More information about the arin-tech-discuss mailing list