~katiekitty/+junk/solidstate

« back to all changes in this revision

Viewing changes to solidstate/branches/v0.5 Alpha/modules/nullregistrar/phpwhois/.svn/text-base/whois.ca.php.svn-base

  • Committer: root
  • Date: 2010-01-13 07:44:31 UTC
  • Revision ID: root@ds3-vamp.cs-monitor.cz.cc-20100113074431-kt8ceoeznpjg22x7
Reviving the project

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/*
 
3
Whois.php        PHP classes to conduct whois queries
 
4
 
 
5
Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
 
6
 
 
7
Maintained by David Saez (david@ols.es)
 
8
 
 
9
For the most recent version of this package visit:
 
10
 
 
11
http://www.phpwhois.org
 
12
 
 
13
This program is free software; you can redistribute it and/or
 
14
modify it under the terms of the GNU General Public License
 
15
as published by the Free Software Foundation; either version 2
 
16
of the License, or (at your option) any later version.
 
17
 
 
18
This program is distributed in the hope that it will be useful,
 
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
GNU General Public License for more details.
 
22
 
 
23
You should have received a copy of the GNU General Public License
 
24
along with this program; if not, write to the Free Software
 
25
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
26
 */
 
27
 
 
28
/* cira.whois        1.0        by Mark Jeftovic <markjr@easydns.com>  */
 
29
/*                   2.0        David Saez <david@ols.es> */
 
30
/*                              standarized object model */
 
31
 
 
32
if (!defined('__CA_HANDLER__'))
 
33
        define('__CA_HANDLER__', 1);
 
34
 
 
35
require_once('whois.parser.php');
 
36
 
 
37
class ca_handler
 
38
        {
 
39
 
 
40
        function parse($data_str, $query)
 
41
                {
 
42
 
 
43
                $items = array(
 
44
                  'Organization:'       => 'owner.organization',
 
45
                  'Registrant-no:'      => 'owner.handle',
 
46
                  'Subdomain:'          => 'domain.name',
 
47
                  'Date-Approved:'      => 'domain.created',
 
48
                  'Date-Modified:'      => 'domain.changed',
 
49
                  'Renewal-Date:'       => 'domain.expires',
 
50
                  'Description:'        => 'domain.desc',
 
51
                  'Registrar:'          => 'domain.sponsor',                  
 
52
                  'Admin-Name:'         => 'admin.name',
 
53
                  'Admin-Postal:'       => 'admin.address.',
 
54
                  'Admin-Phone:'        => 'admin.phone',
 
55
                  'Admin-Mailbox:'      => 'admin.email',
 
56
                  'Admin-Fax:'          => 'admin.fax',
 
57
                  'Tech-Name:'          => 'tech.name',
 
58
                  'Tech-Postal:'        => 'tech.address.',
 
59
                  'Tech-Phone:'         => 'tech.phone',
 
60
                  'Tech-Mailbox:'       => 'tech.email',
 
61
                  'Tech-Fax:'           => 'tech.fax',
 
62
                  'NS1-Hostname:'       => 'domain.nserver.0',
 
63
                  'NS2-Hostname:'       => 'domain.nserver.1',
 
64
                  'NS3-Hostname:'       => 'domain.nserver.2',
 
65
                  'NS4-Hostname:'       => 'domain.nserver.3',
 
66
                  'NS5-Hostname:'       => 'domain.nserver.4',
 
67
                  'NS6-Hostname:'       => 'domain.nserver.5',
 
68
                  'Status:'             => 'domain.status'
 
69
                              );
 
70
 
 
71
                $r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items, 'ymd');
 
72
 
 
73
                $r['regyinfo']['referrer'] = 'http://www.easydns.ca';
 
74
                
 
75
                if (empty($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status']=='AVAIL')
 
76
                        $r['regrinfo']['registered'] = 'no';
 
77
                else
 
78
                        $r['regrinfo']['registered'] = 'yes';
 
79
                        
 
80
                return ($r);
 
81
                }
 
82
 
 
83
        }
 
84
?>