pastebin

Paste Search Dynamic
Recent pastes
ping url
  1. function ping($url)
  2. {
  3.         $fsock = fsockopen($url,80,$errno,$errstr,6);
  4.         var_dump($errno);
  5.         if(!$fsock){
  6.                 return false;
  7.         }else
  8.         {
  9.                 return true;
  10.  
  11.         }
  12. }
  13.  
  14.  
  15. $host ='www.google.co.uk';
  16. $up = ping($host);
  17.  
  18. $faClass = ($up) ? 'fa-check-suqre-o' : 'fa-square-o';
  19. echo sprintf('<i class="fa %s"></i>%s',$faClass,$host);
  20. ?>
Parsed in 0.016 seconds