Re: How to find out if PC is online

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A thought I had is to set up a simple script on the server that, when
executed, pops the time/date/IP into a file (or database) whenever the page
is accessed (this won't work for a yes/no, since there is always going to be
a yes answer, and the lack of an answer will indicate no... but it's hard to
indicate a lack of an answer using this method :)  You could do your test
based on how old the last access was, I guess, and assume that if the
machine was up 60 seconds ago, chances are good it's still up).  Then on the
machine you want to know is up, if Windows, put a shortcut to the webpage
that you just made in the startup folder.  Make the page refresh every x
seconds.  Then write a second script that picks out the values stored in the
first script to see when the last time was that the machine ran the script.
This will give you the time and date and the IP Address (and any more
information you care to set when the machine accesses the script) of the
machine's last activity on the server.

It will work, just not sure if it will accomplish what you're looking for.

(V)

----- Original Message ----- 
From: "Jan Hrebenar" <hrebenar@kn.vutbr.cz>
> Hello All,
>
> I`d like to make script which will detect
> if my computer at IP xxx.xxx.xxx.xxx is online.
> I try to use system("ping") but this function
> is not allowed on server.
>
> Can somebody tell me if exist any other way
> to do this?

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux