PHP 8.5.0 Beta 1 available for testing

Voting

: max(three, five)?
(Example: nine)

The Note You're Voting On

manalejandro at gmail dot com
17 years ago
This logic solution to problem checking dns reverse name resolution:

<?php
$ip
= gethostbyname($host);
if(
ip2long($ip) == -1 || ($ip == gethostbyaddr($ip) && preg_match("/.*\.[a-zA-Z]{2,3}$/",$host) == 0) ) {
echo
'Error, incorrect host or ip';
}
else {
echo
'Ok';
}
?>

<< Back to user notes page

To Top