|
|
|
|
$text = "% By submitting a query to RIPN's Whois Service
% you agree to abide by the following terms of use:
% http://www.ripn.net/about/servpol.html#3.2 (in Russian)
% http://www.ripn.net/about/en/servpol.html#3.2 (in English).
domain: SOCCER.RU
type: CORPORATE
nserver: ns1.hc.ru.
nserver: ns2.hc.ru.
state: REGISTERED, DELEGATED, UNVERIFIED
person: Private Person
phone: +7 495 7995666
fax-no: +7 495 7995665
e-mail: FC_Dynamo_Moscow@hotmail.com
registrar: RUCENTER-REG-RIPN
created: 2002.12.16
paid-till: 2010.12.16
source: TC-RIPN
Last updated on 2009.11.12 15:04:05 MSK/MSD";
|
Как вытащить значение 2010.12.16 с помощью слова paid-till? | |
|
|
|
|
|
|
|
для: Sergeous
(12.11.2009 в 15:24)
| |
<?php
$text = '$text = "% By submitting a query to RIPN\'s Whois Service
% you agree to abide by the following terms of use:
% http://www.ripn.net/about/servpol.html#3.2 (in Russian)
% http://www.ripn.net/about/en/servpol.html#3.2 (in English).
domain: SOCCER.RU
type: CORPORATE
nserver: ns1.hc.ru.
nserver: ns2.hc.ru.
state: REGISTERED, DELEGATED, UNVERIFIED
person: Private Person
phone: +7 495 7995666
fax-no: +7 495 7995665
e-mail: FC_Dynamo_Moscow@hotmail.com
registrar: RUCENTER-REG-RIPN
created: 2002.12.16
paid-till: 2010.12.16
source: TC-RIPN
Last updated on 2009.11.12 15:04:05 MSK/MSD";';
$patt = 'paid-till';
$pos1 = strpos($text, $patt) + strlen($patt) + 1;
$pos2 = strpos($text, "\n", $pos1);
echo $str = trim(substr($text, $pos1, $pos2 - $pos1));
|
| |
|
|
|
|
|
|
|
для: Drago
(12.11.2009 в 15:45)
| | Сасибо! | |
|
|
|