Jump to content

Fileserver


galla2k4eva

Recommended Posts

I'll make sure its an extremely short break.

519876[/snapback]

 

:ph34r: ha! aaron doesn't seem to have been back with any problems yet! I'm guessing you want to have a dynamic sig thing going on with temperatures and all that next? :P

Share this post


Link to post
Share on other sites

  • Replies 234
  • Created
  • Last Reply

Top Posters In This Topic

Well, could look at that code I posted for my sig..

 

// get temperature info from mbmon
   $fp = @fsockopen("localhost", "6666", $errno, $errstr, 1);
   if ($fp) {
       $temps = fread($fp, 1024);
   } else {
       echo "Not connected";
exit(1);
   }

   $temps = explode("\n", $temps);
   for ($i = 0; $i < count($temps); $i++) {
       $temps[$i] = explode(" : ", $temps[$i]);
   }

   $temps[0][0] = "CPU";
   $temps[0][1] .= " C";
   $temps[1][0] = "CPU";
   $temps[1][1] .= " C";
   $temps[2][0] = "Case";
   $temps[2][1] .= " C";
   $temps[3][0] = "CPU Fan";
   $temps[3][1] .= " RPM";
   $temps[4][0] = "";
   $temps[4][1] = "";
   $temps[5][0] = "";
   $temps[5][1] = "";
   $temps[6][0] = "Vcore";
   $temps[6][1] .= " v";
   $temps[6][1] = " ". substr($temps[6][1], 2, strlen($temps[6][1]));
   $temps[7][0] = "";
   $temps[7][1] = "";
   $temps[8][0] = "3.3v Rail";
   $temps[8][1] .= "v";
   $temps[9][0] = "5v Rail";
   $temps[9][1] .= "v";
   $temps[10][0] = "12v Rail";
   $temps[10][1] .= "v";
   $temps[11][0] = "";
   $temps[11][1] = "";
   $temps[12][0] = "";
   $temps[12][1] = "";

 

That gets things in to an array...

Share this post


Link to post
Share on other sites

Yea ive been plying with that but when i echo something nothing comes out.

st", "6666", $er

the 6666 is the port right?

whats 1024?

519885[/snapback]

 

6666 is the port, 1024 is the number of bytes to read... 1024 is plenty (more than) enough for the output of mbmon :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...