Online/Offline ip adress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.