Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

70 lines (42 sloc) 2.403 kb

EPP v1.3.1 (by Ultraspeed)

The EPP gem provides basic functionality for connecting and making requests on EPP (Extensible Provisioning Protocol) servers. It has been fully tested against the RFC 5730 & 5734 specification.

Currently, major providers Centralnic and Nominet have been integrated using this gem. CoCCA is currently in testing.

Installation

You can install this gem with:

$ gem install epp

Then, you can require it in your Ruby/Rails app:

require "epp"

If you're using Rails, configure your gem in the following file:

# Rails 2.x - config/environment.rb
config.gem "epp"

# Rails 3 - Gemfile
gem "epp"

Example Usage

First, you must initialize an Epp::Server object to use. This requires the EPP server address, tag/username and password:

server = Epp::Server.new(
  :server => "testbed-epp.nominet.org.uk",
  :tag => "TESTING",
  :password => "testing"
)

If no port is specified, it will be assumed that you will be using port 700.

You would then make an XML request to the server.

xml       = "<?xml ... </epp>"
response  = server.request(xml)

You can build this however you'd like, although we prefer Hpricot. The process is as follows:

  • Connect to EPP server and receive the <greeting> frame

  • Send a standard <login> request

  • Send your request

  • Send a standard <logout> request

  • Disconnect the socket from the server

The EPP module would then return the XML response as a string. In this example, the response XML would be set equal to response for your usage.

Once the request is complete, it will automatically close the connection. For simplicity purposes, this plug-in will not use a persistent connection to the EPP server. This may change in future releases, as some registries require that persistent connections be supported. Please feel free to email me to collaborate on making this possible.

Bugs/Issues

Please report all issues using the GitHub issue tracker at:

github.com/ultraspeed/epp/issues

Credit

Author: Josh Delsman (twitter.com/voxxit) Inspired from: labs.centralnic.com/Net_EPP_Client.php

License

See the LICENSE file.

Jump to Line
Something went wrong with that request. Please try again.