问题原文
原帖链接 · Alan Kis · CC BY-SA 3.0
I have a website powered by WordPress and I am using MailChimp with the official WP plugin. I know this plugin works as its very popular and it works on my other hosting account but not on this site. I suspect my host is blocking.
How can I check if my hosting provider blocked outbound traffic to some IP addresses?
已采纳解答
原帖链接 · Simon Hayter · CC BY-SA 3.0
The best method would be to ask your hosting provider, but if you have SSH access you could do a simple ping, curl or even traceroute. If you do not have SSH access then you may be able to run this PHP script:
if (!$file) $status = -1; // Site is down else { fclose($file); $status = ($stoptime - $starttime) * 1000; $status = floor($status); } return $status; } ?> <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="domain"> Domain name: <table> <input name="domainname" type="text" > <input type="submit" name="submitBtn" value="Ping domain"> </table> </form> <?php // Check whether the for was submitted if (isset($_POST['submitBtn'])){ $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; $domainbase = str_replace("http://","",strtolower($domainbase)); echo '<table>'; $status = pingDomain($domainbase); if ($status != -1) echo "<tr><td>http://$domainbase is ALIVE ($status ms)</td><tr>"; else echo "<tr><td>http://$domainbase is DOWN</td><tr>"; echo '</table>'; } ?> </body> </html>
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
