2023-12-16 15:55:38 +02:00
2023-12-16 15:55:38 +02:00
2023-12-15 18:14:45 +02:00
2023-12-16 12:55:48 +02:00
2023-12-15 11:51:40 +02:00
2023-12-16 15:45:51 +02:00

net-php

Network Library for PHP with native Yggdrasil support

Install

composer require yggverse/net

Usage

Socket

Check socket is open

var_dump(
    \Yggverse\Net\Socket::isOpen('yo.index', 80)
);

Check host valid

var_dump(
    \Yggverse\Net\Socket::isHost('yo.index')
);

Check port valid

var_dump(
    \Yggverse\Net\Socket::isPort(80)
);

Dig

Resolve records

var_dump(
    \Yggverse\Net\Dig::records('yo.index', ['A', 'AAAA'])
);

Check hostname valid

var_dump(
    \Yggverse\Net\Dig::isHostName('yo.index')
);

Check record valid

var_dump(
    \Yggverse\Net\Dig::isRecord('A')
);

Check record value valid

var_dump(
    \Yggverse\Net\Dig::isRecordValue('A', '127.0.0.1')
);
Description
Languages
PHP 100%