Posted By

nveselinov on 10/12/10


Tagged

check ip port Online offline adress


Versions (?)

Online/Offline ip adress


 / Published in: PHP
 

  1. <?php
  2. $ip = "000.000.00.00";
  3. $port = "80";
  4. if ($check=@fsockopen($ip,$port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
  5. fclose($check);
  6. echo '<b style="color:green">Online</b>';
  7. } else {
  8. echo '<b style="color:red">Offline</b>';
  9. }
  10. ?>

Report this snippet  

You need to login to post a comment.