Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 01-09-2006, 04:20 PM   #1 (permalink)
 
True Techie

Join Date: Dec 2005

Posts: 140

scottjames84

Send a message via Yahoo to scottjames84
Default PHP include help

If I had a script running from my server on my home PC making the computer uptime visable on my website on another server how can I display this in a php include function when my computer is running but when the computer is not running.. ie reseting or turned off it to display a message saying that the computer is not online.

Hope someone can help :-)

Thanks
__________________
scott J Ferguson

----
<img src=\'http://www.scottjess.com/wp-content/uploads/signature.jpg\' alt=\'\' />
Intel P4 3000mhz+, 1024mb DDR ram, 19\" LCD Monitor, 160gig SATA + 300gig SATA Drive, Radeon 9600XT Vid card, ATI All in Wonder remote, Hauppauge 150 PVR tv capture card, windows media center 2005<br>----<br>
scottjames84 is offline  
Old 01-10-2006, 01:49 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,425

office politics will become famous soon enough

Default

windows cluster

http://www.syngress.com/book_catalog...2k3/sample.pdf
office politics is offline  
Old 01-10-2006, 07:48 PM   #3 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

That is one of the most incomprehensible sentences I've read in a long time.

My suggestion is to have a program on your computer at home update a row in a database running on the web server using the mySQL UNIX_TIMESTAMP() command. The uptime script would then simply query the row and compare the value stored to the current value of time() [in PHP] and then if the stored value is older than a certain time (30 secs, maybe?) then the computer should be marked as down. Otherwise, display the uptime as of the last update, which presumably is stored as another long integer in the database.
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On