check ssl port in shared hosting is closed

check ssl port in shared hosting is closed

Check ssl port in shared hosting is closed, use the php code to check if it is open. Here use gmail smtp for checking.

$fp = fsockopen("www.google.com", 80, $errno, &$errstr, 10); // work fine
if (!$fp)
echo "www.google.com - $errstr ($errno)n";
else
echo "www.google.com - okn";
$fp = fsockopen("smtp.gmail.com", 465, $errno, $errstr, 10); // NOT work
if (!$fp)
echo "smtp.gmail.com 465 - $errstr ($errno)n";
else
echo "smtp.gmail.com 465 - okn";
$fp = fsockopen("smtp.gmail.com", 587, $errno, $errstr, 10); // NOT work
if (!$fp)
echo "smtp.gmail.com 587 - $errstr ($errno)n";
else
echo "smtp.gmail.com 587 - okn";

web tips and tricks
web tips and tricks

Topics related to CodeIgniter to send emails through Gmail
send email using codeigniter
codeigniter send html email
codeigniter send email example
codeigniter send email from localhost
codeigniter send email smtp
codeigniter send email without smtp
codeigniter send email html format
codeigniter send email with attachment


smarttips

Leave a Reply

Advertisment ad adsense adlogger