当前位置: 首页>>代码示例>>PHP>>正文


PHP easy_parser函数代码示例

本文整理汇总了PHP中easy_parser函数的典型用法代码示例。如果您正苦于以下问题:PHP easy_parser函数的具体用法?PHP easy_parser怎么用?PHP easy_parser使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了easy_parser函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parse

 function parse($data_str, $query)
 {
     $items = array('domain.name' => 'Domain:', 'domain.nserver.' => 'Nserver:', 'domain.nserver.#' => 'Nsentry:', 'domain.status' => 'Status:', 'domain.changed' => 'Changed:', 'domain.desc.' => 'Descr:', 'owner' => '[Holder]', 'admin' => '[Admin-C]', 'tech' => '[Tech-C]', 'zone' => '[Zone-C]');
     $extra = array('address:' => 'address.street', 'city:' => 'address.city', 'pcode:' => 'address.pcode', 'country:' => 'address.country', 'organisation:' => 'organization', 'name:' => 'name', 'remarks:' => '', 'type:' => '');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
     /*
     if (isset($r['regrinfo']['domain']['desc']))
     	{
     	if (!isset($r['regrinfo']['owner']['name']))
     		$r['regrinfo']['owner']['name'] = $r['regrinfo']['domain']['desc'][0];
     		
     	if (!isset($r['regrinfo']['owner']['address']))
     		for ($i=1; $i<count($r['regrinfo']['domain']['desc']); $i++)
     			$r['regrinfo']['owner']['address'][] = $r['regrinfo']['domain']['desc'][$i];
     			
     	unset($r['regrinfo']['domain']['desc']);
     	}
     */
     $r['regyinfo'] = array('registrar' => 'DENIC eG', 'referrer' => 'http://www.denic.de/');
     if (isset($r['regrinfo']['domain'])) {
         $r['regrinfo']['domain']['changed'] = substr($r['regrinfo']['domain']['changed'], 0, 10);
         $r['regrinfo']['registered'] = 'yes';
     } else {
         $r['regrinfo']['registered'] = 'no';
     }
     return $r;
 }
开发者ID:469306621,项目名称:Languages,代码行数:27,代码来源:whois.de.php

示例2: parse

 function parse($data_str, $query)
 {
     $items = array('domain.created' => 'created:', 'domain.changed' => 'last modified:', 'domain.sponsor' => 'REGISTRAR:', '#' => 'WHOIS displays data with a delay not exceeding 15 minutes in relation to the .pl Registry system');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd');
     $r['regyinfo'] = array('referrer' => 'http://www.dns.pl/english/index.html', 'registrar' => 'NASK');
     return $r;
 }
开发者ID:evdevgit,项目名称:wpblock,代码行数:7,代码来源:whois.pl.php

示例3: parse

 function parse($data_str, $query)
 {
     $items = array('admin' => '(Administrative Contact)', 'tech' => 'Contacto Técnico (Technical Contact):', 'domain.nserver' => 'Servidores de nombre (Domain servers):', 'domain.changed' => '(Database last updated on):');
     $trans = array('organización:' => 'organization', 'nombre      :' => 'name');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'd-m-y', $trans);
     $r['regyinfo'] = array('referrer' => 'http://www.nic.cl', 'registrar' => 'NIC Chile');
     return $r;
 }
开发者ID:yarylo,项目名称:cerkva.pp.ua,代码行数:8,代码来源:whois.cl.php

示例4: parse

 function parse($data_str, $query)
 {
     $translate = ['contact nic-hdl:' => 'handle', 'contact name:' => 'name'];
     $items = ['admin' => 'Contact type:      Admin', 'tech' => 'Contact type:      Tech', 'zone' => 'Contact type:      Zone', 'owner.name' => 'Registrar:', 'owner.email' => 'Registrar email:', 'domain.status' => 'Status:', 'domain.created' => 'Registered:', 'domain.changed' => 'Last updated:', 'domain.nserver.' => 'NS:', '' => '%'];
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $translate);
     $r['regyinfo'] = ['referrer' => 'http://www.domreg.lt', 'registrar' => 'DOMREG.LT'];
     return $r;
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:8,代码来源:whois.lt.php

示例5: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Registrant Contact:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'domain.name' => 'Domain name:', 'domain.sponsor' => 'Registration Service Provided By:', 'domain.referrer' => 'Contact:', 'domain.nserver.' => 'Name Servers:', 'domain.created' => 'Creation date:', 'domain.expires' => 'Expiration date:', 'domain.status' => 'Status:');
     $r = easy_parser($data_str, $items, 'dmy', array(), false, true);
     if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) {
         $r['domain']['sponsor'] = $r['domain']['sponsor'][0];
     }
     return $r;
 }
开发者ID:koTool,项目名称:phpWhois,代码行数:9,代码来源:whois.gtld.domainpeople.php

示例6: parse

 function parse($data_str, $query)
 {
     $items = ['owner' => 'Registrant Contact:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'billing' => 'Billing Contact:', 'domain.name' => 'Domain Name:', 'domain.nserver' => 'Domain servers in listed order:', 'domain.created' => 'Record created on', 'domain.expires' => 'Record expires on'];
     $r = easy_parser($data_str, $items, 'dmy', false, false, true);
     if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) {
         $r['domain']['sponsor'] = $r['domain']['sponsor'][0];
     }
     return $r;
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:9,代码来源:whois.gtld.dreamhost.php

示例7: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Registrant:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact, Zone Contact:', 'domain.name' => 'Domain Name:', 'domain.sponsor' => 'Registrar Name:', 'domain.nserver' => 'Domain servers in listed order:', 'domain.created' => 'Created on..............:', 'domain.expires' => 'Expires on..............:', 'domain.changed' => 'Record last updated on..:');
     $r = easy_parser($data_str, $items, 'dmy', false, false, true);
     if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) {
         $r['domain']['sponsor'] = $r['domain']['sponsor'][0];
     }
     return $r;
 }
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:whois.gtld.markmonitor.php

示例8: parse

 function parse($data_str, $query)
 {
     $items = array('domain.name' => 'Domain:', 'domain.nserver' => 'Nameservers', 'domain.status' => 'Status:', 'domain.expires' => 'Expire Date:', 'owner' => 'Registrant', 'admin' => 'Admin Contact', 'tech' => 'Technical Contacts', 'registrar' => 'Registrar');
     $extra = array('address:' => 'address.', 'contactid:' => 'handle', 'organization:' => 'organization', 'created:' => 'created', 'last update:' => 'changed', 'web:' => 'web');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
     if (isset($r['regrinfo']['registrar'])) {
         $r['regrinfo']['domain']['registrar'] = $r['regrinfo']['registrar'];
         unset($r['regrinfo']['registrar']);
     }
     $r['regyinfo'] = array('registrar' => 'IT-Nic', 'referrer' => 'http://www.nic.it/');
     return $r;
 }
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:12,代码来源:whois.it.php

示例9: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Domain ' . $query . ':', 'admin' => 'Administrative contact:', 'tech' => 'Technical contact:', 'billing' => 'Billing contact:', '' => 'Record dates:');
     $r = easy_parser($data_str, $items, 'mdy', false, false, true);
     if (!isset($r['tech'])) {
         $r['tech'] = $r['billing'];
     }
     if (!isset($r['admin'])) {
         $r['admin'] = $r['tech'];
     }
     return $r;
 }
开发者ID:evdevgit,项目名称:wpblock,代码行数:12,代码来源:whois.gtld.fabulous.php

示例10: parse

 function parse($data_str, $query)
 {
     $items = ['domain.name' => 'Domain name:', 'domain.sponsor' => 'Registrar:', 'domain.nserver' => 'Name Servers:', 'domain.changed' => 'Domain record last updated:', 'domain.created' => 'Domain record activated:', 'owner' => 'Registrant:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'billing' => 'Billing Contact:'];
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'dmy');
     if (isset($b['tech'])) {
         if ($r['regrinfo']['tech']['name'] == 'Same as above') {
             $r['regrinfo']['tech'] = $r['regrinfo']['admin'];
         }
     }
     $r['regyinfo']['referrer'] = 'http://whois.educause.net';
     $r['regyinfo']['registrar'] = 'EDUCASE';
     return $r;
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:13,代码来源:whois.edu.php

示例11: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Registrant:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'billing' => 'Billing Contact:', 'domain.nserver' => 'Name Servers:', 'domain.created' => 'Created On:', 'domain.expires' => 'Expiration Date:', 'domain.changed' => 'Last Updated On:', 'domain.sponsor' => 'Registrar:');
     $extra = array('city:' => 'address.city', 'state:' => 'address.state', 'dns:' => '0');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'dmy', $extra);
     $r['regyinfo'] = array('registrar' => 'NIC Mexico', 'referrer' => 'http://www.nic.mx/');
     if (empty($r['regrinfo']['domain']['created'])) {
         $r['regrinfo']['registered'] = 'no';
     } else {
         $r['regrinfo']['registered'] = 'yes';
     }
     return $r;
 }
开发者ID:469306621,项目名称:Languages,代码行数:13,代码来源:whois.mx.php

示例12: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Registrant:', 'admin' => 'Administrative contact:', 'tech' => 'Technical contact:', 'domain.nserver' => 'Name servers:', 'domain.status' => 'Domain status:', 'domain.created' => 'Approval date:', 'domain.expires' => 'Renewal date:', 'domain.changed' => 'Name servers last changed:');
     $extra = array('postal address:' => 'address.0', 'job title:' => '', 'number:' => 'handle', 'description:' => 'organization');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
     $r['regyinfo'] = array('registrar' => 'CIRA', 'referrer' => 'http://www.cira.ca/');
     if (empty($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status'] == 'AVAIL') {
         $r['regrinfo']['registered'] = 'no';
     } else {
         $r['regrinfo']['registered'] = 'yes';
     }
     return $r;
 }
开发者ID:469306621,项目名称:Languages,代码行数:13,代码来源:whois.ca.php

示例13: parse

 function parse($data_str, $query)
 {
     $items = array('domain.name' => 'Domain:', 'domain.nserver.' => 'Nserver:', 'domain.nserver.#' => 'Nsentry:', 'domain.status' => 'Status:', 'domain.changed' => 'Changed:', 'domain.desc.' => 'Descr:', 'owner' => '[Holder]', 'admin' => '[Admin-C]', 'tech' => '[Tech-C]', 'zone' => '[Zone-C]');
     $extra = array('city:' => 'address.city', 'postalcode:' => 'address.pcode', 'countrycode:' => 'address.country', 'remarks:' => '', 'sip:' => 'sip', 'type:' => '');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
     $r['regyinfo'] = array('registrar' => 'DENIC eG', 'referrer' => 'http://www.denic.de/');
     if (!isset($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status'] == "free") {
         $r['regrinfo']['registered'] = 'no';
     } else {
         $r['regrinfo']['domain']['changed'] = substr($r['regrinfo']['domain']['changed'], 0, 10);
         $r['regrinfo']['registered'] = 'yes';
     }
     return $r;
 }
开发者ID:davidegiunchidiennea,项目名称:all-in-one-wordpress-security,代码行数:14,代码来源:whois.de.php

示例14: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Registrant Contact:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact', 'domain.name' => 'Domain Name:', 'domain.status' => 'Status:', 'domain.nserver' => 'Name Server:', 'domain.created' => 'Creation Date:', 'domain.expires' => 'Expiration Date:');
     $r = easy_parser($data_str, $items, 'dmy', array(), false, true);
     if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) {
         $r['domain']['sponsor'] = $r['domain']['sponsor'][0];
     }
     foreach ($r as $key => $part) {
         if (isset($part['address'])) {
             $r[$key]['organization'] = array_shift($r[$key]['address']);
             $r[$key]['address']['country'] = array_pop($r[$key]['address']);
         }
     }
     return $r;
 }
开发者ID:koTool,项目名称:phpWhois,代码行数:15,代码来源:whois.gtld.nameintel.php

示例15: parse

 function parse($data_str, $query)
 {
     $items = array('owner' => 'Registrant:', 'admin' => 'Administrative contact:', 'tech' => 'Technical contact:', 'domain.sponsor' => 'Registrar:', 'domain.nserver' => 'Name servers:', 'domain.status' => 'Domain status:', 'domain.created' => 'Creation date:', 'domain.expires' => 'Expiry date:', 'domain.changed' => 'Updated date:');
     $extra = array('postal address:' => 'address.0', 'job title:' => '', 'number:' => 'handle', 'description:' => 'organization');
     $r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
     if (!empty($r['regrinfo']['domain']['sponsor'])) {
         list($v, $reg) = explode(':', $r['regrinfo']['domain']['sponsor'][0]);
         $r['regrinfo']['domain']['sponsor'] = trim($reg);
     }
     if (empty($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status'] == 'available') {
         $r['regrinfo']['registered'] = 'no';
     } else {
         $r['regrinfo']['registered'] = 'yes';
     }
     $r['regyinfo'] = array('registrar' => 'CIRA', 'referrer' => 'http://www.cira.ca/');
     return $r;
 }
开发者ID:evdevgit,项目名称:wpblock,代码行数:17,代码来源:whois.ca.php


注:本文中的easy_parser函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。