PHP-Fusion
v.7.01
AP-Fusion
v7.02.03
Pimped-Fusion-AP
v0.09.03
февраля 11 2012 04:39:22
Навигация
· Новости
· Статьи
· Скачать
· Форум
· Ссылки
· Категории новостей
· Обратная связь
· Галерея
· Поиск
· Гостевая
· Коллекция аватар
· CMS AP-Fusion. Отличия от PHP-Fusion
· Javascript справочник
· Разное
Сейчас на сайте
· Гостей: 1

· Пользователей: 0

· Всего пользователей: 441
· Новый пользователь: yak21
Информеры
Загрузка файлов  +  -
Бытовая техника:  +  
Лента alipapa.ru
Карпаты. Драгобрат.
Карпаты. Яремче, Яблунецкий перевал.
dbForge Studio for MySQL вместо PHPMyAdmin
Облачные технологии - насколько это серьезно?
Как распределяется вес по сайту
Совместимость CMS

Solomono.ru - сервис для веб-мастера
Микроразметка веб-страниц.
АГС - не приговор.
Немного о политике.

Что такое АГС и как с ним бороться?
Долгожданный АП PR
PR Google: 9 месяцев без апдейта

Поведенческий фактор - модная тенденция?
Wi-Fi дома. Что делать, если 192.168.0.1 занято?
Ускоренная переиндексация страниц в Яндексе

Как я ставил винду на нетбук.
ROOKEE - инструмент оптимизатора.
Строим рейтинг-каталог
Смайлики прошлого века
Ссылки  +  -
Блоги
Alipapa
» Блог Алипапы
lom
» Блог Лома
Последние активные темы форума
  Темы Просмотров Ответов Последние сообщения
Pimped-Fusion. Первые впеча...
Ошибки, баги, глюки
1732 83 Alipapa
10-02-2012 19:36
Произвольные Title на любой...
Вопросы по работе
44 1 Alipapa
07-02-2012 14:28
Мультикатегории в новостях
Моды, плагины
238 8 Alipapa
28-01-2012 00:47
AP-Fusion 7.02
Вопросы по работе
2719 29 Alipapa
18-01-2012 17:59
Расширенный каталог статей.
Моды, плагины
12085 167 Alipapa
14-12-2011 23:32

dns_get_record

(PHP 5)

dns_get_record --  Fetch DNS Resource Records associated with a hostname

Description

array dns_get_record ( string hostname [, int type [, array &authns, array &addtl]] )

Замечание: This function is not implemented on Windows platforms, nor does it (currently) work on *BSD systems. Try the PEAR class Net_DNS.

Эта функция возвращает array of associative arrays. Each associative array contains at minimum the following keys:

Таблица 1. Basic DNS attributes

AttributeMeaning
hostThe record in the DNS namespace to which the rest of the associated data refers.
classdns_get_record() only returns Internet class records and as such this parameter will always return IN.
typeString containing the record type. Additional attributes will also be contained in the resulting array dependant on the value of type. See table below.
ttlTime To Live remaining for this record. This will not equal the record's original ttl, but will rather equal the original ttl minus whatever length of time has passed since the authoritative name server was queried.

hostname should be a valid DNS hostname such as "www.example.com". Reverse lookups can be generated using in-addr.arpa notation, but gethostbyaddr() is more suitable for the majority of reverse lookups.

By default, dns_get_record() will search for any resource records associated with hostname. To limit the query, specify the optional type parameter. type may be any one of the following: DNS_A, DNS_CNAME, DNS_HINFO, DNS_MX, DNS_NS, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ALL or DNS_ANY. The default is DNS_ANY.

Замечание: Because of eccentricities in the performance of libresolv between platforms, DNS_ANY will not always return every record, the slower DNS_ALL will collect all records more reliably.

The optional third and fourth arguments to this function, authns and addtl are passed by reference and, if given, will be populated with Resource Records for the Authoritative Name Servers, and any Additional Records respectively. See the example below.

Таблица 2. Other keys in associative arrays dependant on 'type'

TypeExtra Columns
Aip: An IPv4 addresses in dotted decimal notation.
MXpri: Priority of mail exchanger. Lower numbers indicate greater priority. target: FQDN of the mail exchanger. Смотрите также dns_get_mx().
CNAMEtarget: FQDN of location in DNS namespace to which the record is aliased.
NStarget: FQDN of the name server which is authoritative for this hostname.
PTRtarget: Location within the DNS namespace to which this record points.
TXTtxt: Arbitrary string data associated with this record.
HINFOcpu: IANA number designating the CPU of the machine referenced by this record. os: IANA number designating the Operating System on the machine referenced by this record. See IANA's Operating System Names for the meaning of these values.
SOAmname: FQDN of the machine from which the resource records originated. rname: Email address of the administrative contain for this domain. serial: Serial # of this revision of the requested domain. refresh: Refresh interval (seconds) secondary name servers should use when updating remote copies of this domain. retry: Length of time (seconds) to wait after a failed refresh before making a second attempt. expire: Maximum length of time (seconds) a secondary DNS server should retain remote copies of the zone data without a successful refresh before discarding. minimum-ttl: Minimum length of time (seconds) a client can continue to use a DNS resolution before it should request a new resolution from the server. Can be overridden by individual resource records.
AAAAipv6: IPv6 address
A6(PHP >= 5.1.0)masklen: Length (in bits) to inherit from the target specified by chain. ipv6: Address for this specific record to merge with chain. chain: Parent record to merge with ipv6 data.
SRVpri: (Priority) lowest priorities should be used first. weight: Ranking to weight which of commonly prioritized targets should be chosen at random. target and port: hostname and port where the requested service can be found. For additional information see: RFC 2782
NAPTRorder and pref: Equivalent to pri and weight above. flags, services, regex, and replacement: Parameters as defined by RFC 2915.

Замечание: Per DNS standards, email addresses are given in user.host format (for example: hostmaster.example.com as opposed to hostmaster@example.com), be sure to check this value and modify if necessary before using it with a functions such as mail().

Пример 1. Using dns_get_record()

<?php
$result
= dns_get_record ( "php.net" );
print_r ( $result );
?>

Produces output similar to the following:

Array
(
    [0] => Array
   (
       [host] => php.net
       [type] => MX
       [pri] => 5
       [target] => pair2.php.net
       [class] => IN
       [ttl] => 6765
   )

    [1] => Array
   (
       [host] => php.net
       [type] => A
       [ip] => 64.246.30.37
       [class] => IN
       [ttl] => 8125
   )

)

Since it's very common to want the IP address of a mail server once the MX record has been resolved, dns_get_record() also returns an array in addtl which contains associate records. authns is returned as well containing a list of authoritative name servers.

Пример 2. Using dns_get_record() and DNS_ANY

<?php
/* Request "ANY" record for php.net,
   and create $authns and $addtl arrays
   containing list of name servers and
   any additional records which go with
   them */
$result = dns_get_record ( "php.net" , DNS_ANY , $authns , $addtl );
echo
"Result = " ;
print_r ( $result );
echo
"Auth NS = " ;
print_r ( $authns );
echo
"Additional = " ;
print_r ( $addtl );
?>

Produces output similar to the following:

Result = Array
(
    [0] => Array
   (
       [host] => php.net
       [type] => MX
       [pri] => 5
       [target] => pair2.php.net
       [class] => IN
       [ttl] => 6765
   )

    [1] => Array
   (
       [host] => php.net
       [type] => A
       [ip] => 64.246.30.37
       [class] => IN
       [ttl] => 8125
   )

)
Auth NS = Array
(
    [0] => Array
   (
       [host] => php.net
       [type] => NS
       [target] => remote1.easydns.com
       [class] => IN
       [ttl] => 10722
   )

    [1] => Array
   (
       [host] => php.net
       [type] => NS
       [target] => remote2.easydns.com
       [class] => IN
       [ttl] => 10722
   )

    [2] => Array
   (
       [host] => php.net
       [type] => NS
       [target] => ns1.easydns.com
       [class] => IN
       [ttl] => 10722
   )

    [3] => Array
   (
       [host] => php.net
       [type] => NS
       [target] => ns2.easydns.com
       [class] => IN
       [ttl] => 10722
   )

)
Additional = Array
(
    [0] => Array
   (
       [host] => pair2.php.net
       [type] => A
       [ip] => 216.92.131.5
       [class] => IN
       [ttl] => 6766
   )

    [1] => Array
   (
       [host] => remote1.easydns.com
       [type] => A
       [ip] => 64.39.29.212
       [class] => IN
       [ttl] => 100384
   )

    [2] => Array
   (
       [host] => remote2.easydns.com
       [type] => A
       [ip] => 212.100.224.80
       [class] => IN
       [ttl] => 81241
   )

    [3] => Array
   (
       [host] => ns1.easydns.com
       [type] => A
       [ip] => 216.220.40.243
       [class] => IN
       [ttl] => 81241
   )

    [4] => Array
   (
       [host] => ns2.easydns.com
       [type] => A
       [ip] => 216.220.40.244
       [class] => IN
       [ttl] => 81241
   )

)

Смотрите также dns_get_mx(), and dns_check_record()

Все функции PHP:
Авторизация
Логин

Пароль



Вы не зарегистрированы?
Нажмите здесь для регистрации.

Забыли пароль?
Запросите новый здесь.
Мини-чат
Вы должны авторизироваться, чтобы добавить сообщение.

04/02/2012 09:08
Еще раз прошу всех. Если вопрос не личный, пишите в форум. В личке, аське, скайпе, мейле и т.д. не консультирую

14/01/2012 18:45
avisei, пиши в форум, а не шли мне личные посланья

31/12/2011 16:01
С праздником Нового Года! Успехов, счастья, богатства!

08/12/2011 16:13
MySQL нужен. Инструкция вот: [url]http://ap-fus
ion.ru/downloads.p
hp?download_id=58[
/url]

08/12/2011 16:03
Я канеш дико извиняюсь, но где на этом сайте статья по установке fusion, нужен ему MySql или нет? Smile

07/12/2011 11:03
ОК)

07/12/2011 11:02
этот - для 7.0

07/12/2011 11:00
Я устанавливаю, как в инструкции. Куча ошибок. Не могу сделать upgrade!

07/12/2011 10:56
Для какой стандартной подходит, для такой же и ap-fusion подойдет

07/12/2011 10:54
Для какой версии AP-FUSION подходит "extended-downloads
"? Shock

24/10/2011 20:48
Валиор, я не поленился и проверил еще раз - в трех файлах этот фрагмент есть, в одном из них - дважды. Так что я не ошибся, это Вы так искали.

24/10/2011 16:06
Ну Вам удалось, значит в принципе возможно. А вообще не рекомендую, но если очень хочется, придется смириться с некоторыми неудобствами. На этом сайте поддержка реализована частично.

24/10/2011 16:05
Возможно ли регистрировать кирилические ники? В письме с регистрацией не указан логин.

21/10/2011 17:03
Занимаюсь. Локаль в порядок привожу. Сегодня или завтра что-нибудь выложу.

20/10/2011 16:09
да бог с ним, ты лучше пимпедом займись, а я не буду в этой сборке использовать основной каталог.

18/10/2011 21:54
Papich, плагин проверю обязательно, мб неисправленный в сборку поставил

22/09/2011 20:47
http://tools.dynam
icdrive.com/favico
n/ - фавиконка быстро и удобно

12/08/2011 21:09
Потому что не осознали еще всего того удобства, что он предоставляет.

10/08/2011 10:20
Почему никого не интересует мой новый чат?

13/06/2011 12:13
Самому не нравится. Пробовал по всякому. Вдобавок ещё и таблицу обрезает, остаётся процентов 40. http://www.cqham.s
umy.ua/viewpage.ph
p?page_id=44 - вариант вставки таблицы

Анонс
Последние статьи
· СМС и Вебмани
· TinyMCE для пользова...
· PCRE (Perl Compatibl...
· PCRE (Perl Compatibl...
· 510
4,244,171 уникальных посетителей Iceberg by Harly