<?php class online { private $ip; private $socket; private $timeStart; private $timeEnd; private $errno; function __construct( $ip, $socket = 80 ) { $this->ip = $ip; $this->socket = $socket; } function timer() { $sec = (double) $time[1]; $msec = (double) $time[0]; return $sec + $msec; } function getTime() { return $this->timeEnd = $this->timeStart - $this->timer(); } function isOnline() { $this->timeStart = $this->timer(); { throw new Exception( 'OFFLINE', $this->errno ); } else { throw new Exception( 'ONLINE - time: '.$this->getTime, $this->errno ); } } } try { $o = new online( 'www.wp.pl', 80 ); $o->isOnline(); } catch ( Exception $e ) { } ?>
no i nic nie jest wyswietlane... dlaczego ? co zle robie ?