« Back to profile of k0k0p0ps

    						if (!dl("php_w32api.dll")) {
  echo "Unable to load php_w32api.dll";
  exit;
}

$api = new win32;
$api->registerfunction("bool QueryPerformanceCounter (float &lpPerformanceCount) From kernel32.dll");
$api->registerfunction("bool QueryPerformanceFrequency (float &lpPerformanceFrequency) From kernel32.dll");

$api->QueryPerformanceCounter($a);
$api->QueryPerformanceFrequency($b);
$c = $a/$b;
$days = floor($c / 86400);
echo gmstrftime("System uptime is $days Days, %H Hr, %M Min, %S Sec<br>", $c);    			         

    2 comments

  • xford says :

    nice code but you forget summing a lot of system administrator closing this function thank,s for good code :)

  • dewan159 says :

    Nice ... it's the first time for me to hear about the dl function

Add comment
To add a comment, please : Login or Sign up
    k0k0p0ps
    Kareem Salama
    • Biography Information systems professional with a 10 year background in project management, systems analysis, programming, and marketing within the software industry.

    • View full profile »
  • New visitor?

    On setCode, you can save your codes, functions and classes, you can also share them with your friends, and track your favorite developer

    Join the SetCode community
  • Your language here :