18 lines
443 B
PHP
18 lines
443 B
PHP
<?php
|
|
// test_smtp.php
|
|
$host = 'smtp.hostinger.com';
|
|
$ports = [587, 465];
|
|
|
|
foreach ($ports as $port) {
|
|
$connection = @fsockopen($host, $port, $errno, $errstr, 10);
|
|
|
|
if (is_resource($connection)) {
|
|
echo "✅ Port $port is OPEN\n";
|
|
fclose($connection);
|
|
} else {
|
|
echo "❌ Port $port is CLOSED: $errstr ($errno)\n";
|
|
}
|
|
}
|
|
|
|
// Test DNS
|
|
echo "DNS resolution: " . gethostbyname('smtp.hostinger.com') . "\n"; |