Created
November 28, 2014 03:38
-
-
Save hanafiah/2b25169116de8341af0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//contoh hash yang hendak di semak | |
$lookup_txt = 'sample1-123'; | |
var_dump(is_txt_exist('ibnuyahya.com',$lookup_txt)); | |
function is_txt_exist($tld,$lookup_txt){ | |
$txts = dns_get_record($tld,DNS_TXT); | |
foreach ($txts as $txt) { | |
if($lookup_txt ==$txt['txt'] ) | |
return TRUE; | |
} | |
return FALSE; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment