Skip to content

Instantly share code, notes, and snippets.

View rixafy's full-sized avatar
👋
Je M’appelle rix

Šimon Kandráč rixafy

👋
Je M’appelle rix
  • Prague, Czechia
  • 12:19 (UTC +02:00)
View GitHub Profile
@bohwaz
bohwaz / dns_get_record_from.php
Last active May 21, 2025 02:48
PHP script to retrieve a DNS record from a custom nameserver
<?php
/**
* Make a DNS a request to a custom nameserver, this is similar to dns_get_record, but allows you to query any nameserver
* Usage: dns_get_record_from('ns.server.tld', 'A', 'mydomain.tld');
* => ['42.42.42.42']
* @author bohwaz
*/
function dns_get_record_from(string $server, string $type, string $record, string $protocol = 'udp'): array
{