Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Abbreviated output when attempting to do whois via script

by PodMaster (Abbot)
on Aug 01, 2004 at 16:07 UTC ( #379097=note: print w/replies, xml ) Need Help??

in reply to Abbreviated output when attempting to do whois via script

Ask your whois program (works for me).
$ perl -le'print `whois`' NOTICE: Access to .ORG WHOIS information is provided to assist persons + in determining the contents of a domain name registration record in the P +IR registry database. The data in this record is provided by Public Inter +est Regist ry for informational purposes only, and PIR does not guarantee its accuracy. This service is intended only for query-based access. You +agree that you will use this data only for lawful purposes and that, under n +o circumstances will you use this data to: (a) allow, enable, or otherwi +se support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other + than the data recipient's own existing customers; or (b) enable high volume +, automated, electronic processes that send queries or data to the syste +ms of Registry Operator or any ICANN-Accredited Registrar, except as reasona +bly necessary to register domain names or modify existing registrations. +All rights reserved. PIR reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Domain ID:D2013834-LROR Domain Name:PERLMONKS.ORG Created On:21-Sep-1998 04:00:00 UTC Last Updated On:05-Apr-2004 05:18:56 UTC Expiration Date:20-Sep-2005 04:00:00 UTC Sponsoring Registrar:R11-LROR Status:CLIENT TRANSFER PROHIBITED Status:CLIENT UPDATE PROHIBITED Registrant ID:tuCZytFOzdNJ8Qli Registrant Name:Allison Randal Registrant Organization:The Perl Foundation Registrant Street1:2861 Barclay Way Registrant City:Ann Arbor Registrant State/Province:MI Registrant Postal Code:48105 Registrant Country:US Registrant Phone:+1.4124887936 Registrant Admin ID:tuTeuejWDPUhKCeC Admin Name:Ask Bjoern Hansen Admin Organization:The Perl Foundation Admin Street1:PO Box 18111 Admin City:Beverly Hills Admin State/Province:CA Admin Postal Code:90209 Admin Country:US Admin Phone:+1.4124887936 Admin Tech ID:tuyX7wRHQsn13sNK Tech Name:Ask Bjoern Hansen Tech Organization:Develooper LLC Tech Street1:PO Box 18111 Tech City:Beverly Hills Tech State/Province:CA Tech Postal Code:90209 Tech Country:US Tech Phone:+1.4137232698 Tech FAX:+1.4132540312 Tech Name Server:NS2.DEVELOOPER.COM Name Server:NS1.US.BITNAMES.COM Name Server:NS2.US.BITNAMES.COM Name Server:NS1.EU.BITNAMES.COM

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: Abbreviated output when attempting to do whois via script
by jerrygarciuh (Curate) on Aug 01, 2004 at 17:04 UTC
    Thanks for the reply podmaster,

    So now I am baffled. This does indeed work:

    perl -le'print `whois`'

    So what am I doing wrong here? Why does this get only the abbreviated output?

    #!/usr/local/bin/perl -w use strict; use CGI::Carp qw/fatalsToBrowser /; use CGI qw/:standard/; use CGI::Pretty qw/ :html3 /; my $dom = ""; my $q = CGI->new(); print $q->header,start_html, '<pre>'; print my $output = `whois $dom` . '</pre>';

    BTW when I use this code to lookup a domain which is NOT in the redemption period, I have just found that it works fine.

    Any thoughts?

    "The man who grasps principles can successfully select his own methods.
    The man who tries methods, ignoring principles, is sure to have trouble.
    ~ Ralph Waldo Emerson
      Perhaps your shell environment has a different PATH or an alias that adds other command-line options, which your CGI script lacks because it's running in the web server's environment. Try doing "which whois" in the shell and then use the full path in the CGI script.

        Thanks for the reply. I have the full path in now (/usr/bin/whois) but sadly get the same results.

        Any other suggestions folks?

        "Transport of the mails, transport of the human voice, transport of flickering pictures - in this century, as in others, our highest accomplishments still have the single aim of bringing people together."
        Wind, Sand, and Stars
        Antoine-Marie-Roger de Saint-Exupery

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://379097]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2018-12-15 08:45 GMT
Find Nodes?
    Voting Booth?
    How many stories does it take before you've heard them all?

    Results (69 votes). Check out past polls.