eabwhois

UNIX name Owner Status
eabwhois Brookins Consulting stable
Version Compatible with
N/A N/A
eZ Publish legacy extension providing an interface to whois servers.

eabwhois

eZ Publish legacy extension providing an interface to whois servers.

Summary

Provides a template fetch function and an Ajax call to interface with various whois servers.

Requirements

This version requires eZ Publish 4 or eZ Publish 5 Legacy Edition.
It requires two libraries for parsing text from whois servers:

It also requires the following eZ Publish legacy extensions:

  • ezjscore

Copyright

eZ Publish wrapper copyright 2012-2014 Enterprise AB Ltd.

Parser libraries:

License

eZ Publish wrapper licensed GPL.

Parser libraries:

Install

  1. Copy the eabwhois folder to the extension folder.
  2. Edit settings/override/site.ini.append.php
  3. Under [ExtensionSettings] add:
    ActiveExtensions[]=eabwhois
  4. Clear the cache:
    bin/php/ezcache.php --clear-all

Usage

Use of fetch:

$whois = fetch( 'whois', 'info', hash( 'domain', $domain_name ))

Information held at the Registrar


{if $whois.expiry_date}

Expiry date: {$whois.expiry_date|wash}

{/if}
{if $whois.registrar}

Registrar: {$whois.registrar|wash}

{/if}
{if $whois.owner}

Owner: {$whois.owner|wash}

{/if}
{if $whois.address}

Address: {$whois.address|wash}

{/if}
{if $whois.warning}

Warning


{$whois.warning}


{/if}

Example Ajax call to write information into an element <div id="whoisfeedback">:

$.ez( 'ezjscwhois::info::'+domain, {http_accept: 'json'}, function( ezp_data ) {
if ( ezp_data.error_text )
{
alert( ezp_data.error_text );
}
else
{
$("#whoisfeedback").html( "

Domain details:

" );

if (ezp_data.content.owner)
$("#whoisfeedback").append( "

Owner: " + ezp_data.content.owner + "

" );
else
$("#whoisfeedback").append( "

Owner: unknown

" );

if (ezp_data.content.warning)
$("#whoisfeedback").append( '

Warning: ' + ezp_data.content.warning + '

' );
}
}

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.