شنبه,۰۴ بهمن ماه ۱۳۹۹مطابق با
۹ جمادى الثانى ۱۴۴۲ هجرى قمرى

PHP Network
1- Is domain name taken 2- Get IP address 3- Port scan |
4- URL validation by Regular Expression
if (isset($_POST[‘posted’])) {
$url = $_POST[‘url’];
$theresults = ereg(“^[a-zA-Z0-9]+://[^ ]+$”, $url, $trashed);
if ($theresults) { $isamatch = “Valid”;
} else { $isamatch = “Invalid”; }
echo “URL validation says $url is ” . $isamatch;
}
5- DNS and host validation
$hostname = “www.yahoo.com”;
if (!isset($hostname)) {
die(“Hostname value wasn’t properly submitted. Retry.”);
}
if(empty($hostname)){
die(“Hostname field was left blank! Retry.”);
}
echo $hostname;
if(checkdnsrr($hostname)) {
echo “has a valid MX record!”;
} else { die(“does not exist”); }
Leave a Reply
See more website here...
Subpages
- Wissenschaft, Technik, Kultur
- About Me
Categories
- Ali Esteki (1)
- Blog (17)
- Electronic (12)
- iribTv (4)
- Linux (10)
- Ring Clock Project (4)
- Root (18)
- Tools (6)
- WordPress (6)