fhferreira / php-dig
Use servers CLI command dig over php internal dns_get_record() function - just a fork of hostinger/php-dig
1.1
2021-11-25 14:57 UTC
Requires
- php: >=5.6
- psr/log: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.6
- dev-master
- 1.1
- 1
- dev-feature/add-extras-to-mail-event
- dev-feature/add-extras-to-mail-events
- dev-feature/add-middleware
- dev-feature/allow-more-app-creations-per-five-minutes
- dev-feature/complete-gamification-task
- dev-feature/disposable-emails-crud
- dev-feature/dont-report-awex-exceptions
- dev-feature/dont-report-timeouts
- dev-feature/dont-send-letter-to-old-users
- dev-feature/enable-logs
- dev-feature/gamification
- dev-feature/gamification-barebones
- dev-feature/gamification-index-endpoint
- dev-feature/group-domains
- dev-feature/log-critical-errors-to-slack
- dev-feature/log-failing-tasks
- dev-feature/log-fatals-to-slack
- dev-feature/logging-improvemets
- dev-feature/longer-email-confirmation-links
- dev-feature/mail-cron-tweaks
- dev-feature/mails-to-developers
- dev-feature/modify-onboarding-table
- dev-feature/onboarding-base
- dev-feature/onboarding-mail-crons
- dev-feature/prevent-fatals-in-login
- dev-feature/push-mail-events
- dev-feature/remove-channel-ping-from-message
- dev-feature/remove-redundant-process
- dev-feature/remove-route
- dev-feature/remove-sift-science
- dev-feature/sale-after-2-weeks
- dev-feature/select-email-in-cron
- dev-feature/show-nps-every-2-weeks
- dev-feature/slack-webhook
- dev-feature/staging-env
- dev-feature/suspend-bandwidth-overused-apps
- dev-feature/try-catch-slack-message
- dev-feature/turn-off-slack-notifications
- dev-fix/add-check
- dev-fix/add-missing-import
- dev-fix/add-query-fixer
- dev-fix/date-missmatch
- dev-fix/do-not-send-email-if-model-not-found
- dev-fix/dont-consume-uploaded-files-trigger
- dev-fix/dont-create-null-event
- dev-fix/dont-let-social-impersonate
- dev-fix/field-naming
- dev-fix/filemanager-token-expiration
- dev-fix/import-exception
- dev-fix/invert-if
- dev-fix/logging-fixes
- dev-fix/missing-return
- dev-fix/notification-params
- dev-fix/notification-tweaks
- dev-fix/null-object-in-controller
- dev-fix/optimize-trimming
- dev-fix/order-notifications-desc
- dev-fix/param-order
- dev-fix/premium-apps-cancel
- dev-fix/query-fix
- dev-fix/query-tweaks
- dev-fix/remove-logs
- dev-fix/remove-missing-class
- dev-fix/report-only-fatals
- dev-fix/scope-tweaks
- dev-fix/sql-syntax
- dev-fix/trim-domain-whitespaces
- dev-fix/unsubscribe-link-tweaks
This package is not auto-updated.
Last update: 2024-11-09 03:36:56 UTC
README
Introduction
PHP DNS functions don't have a timeout while the default timeout for dig is 5 seconds (with several (3) tries)
It should drastically decrease time to get dns records, and lower failure errors like dns_get_record(): A temporary server error occurred.
Installation
Install the latest version with
$ composer require fhferreira/php-dig
Usage
$client = new Hostinger\DigClient(); $result = $client->getRecord('hostinger.com', DNS_MX);
This is equal to
dns_get_record('hostinger.com', DNS_MX);
Package checks if it can run exec
in server environment, otherwise it will fallback to dns_get_record().
DigClient implements LoggerAwareInterface
You can set logger to debug / log package activity
$client = new Hostinger\DigClient(); $logger = new \Monolog\Logger\Logger('App'); $logger->pushHandler(new StreamHandler('path/to/your.log')); $client->setLogger($logger);
About
Requirements
- php-dig client works with PHP 5.6 or above.
Submitting bugs and feature requests
Bugs and feature request are tracked on GitHub