How To Use Win32api Via Php

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > PHP Programming

How To Use Win32api Via Php

LuciferStar
I found these codes,but doesn't work well.
Does anyone know howto?

Thanks!
CODE
<?php
// Define constants needed, taken from
// Visual Studio/Tools/Winapi/WIN32API.txt
define("MB_OK", 0);

// Load the extension in
dl("php_w32api.dll");

// Register the GetTickCount function from kernel32.dll
w32api_register_function("kernel32.dll",
                        "GetTickCount",
                        "long");
                       
// Register the MessageBoxA function from User32.dll
w32api_register_function("User32.dll",
                        "MessageBoxA",
                        "long");

// Get uptime information
$ticks = GetTickCount();

// Convert it to a nicely displayable text
$secs  = floor($ticks / 1000);
$mins  = floor($secs / 60);
$hours = floor($mins / 60);

$str = sprintf("You have been using your computer for:".
               "\r\n %d Milliseconds, or \r\n %d Seconds".
               "or \r\n %d mins or\r\n %d hours %d mins.",
               $ticks,
               $secs,
               $mins,
               $hours,
               $mins - ($hours*60));

// Display a message box with only an OK button and the uptime text
MessageBoxA(NULL,
           $str,
           "Uptime Information",
           MB_OK);
?>

 

 

 


Reply

Lary
QUOTE
<?php
// Define constants needed, taken from
// Visual Studio/Tools/Winapi/WIN32API.txt
define("MB_OK", 0);

// Load the extension in
dl("php_w32api.dll");

// Register the GetTickCount function from kernel32.dll
w32api_register_function("kernel32.dll",
                        "GetTickCount",
                        "long");
                       
// Register the MessageBoxA function from User32.dll
w32api_register_function("User32.dll",
                        "MessageBoxA",
                        "long");

// Get uptime information
$ticks = GetTickCount();

// Convert it to a nicely displayable text
$secs  = floor($ticks / 1000);
$mins  = floor($secs / 60);
$hours = floor($mins / 60);

$str = sprintf("You have been using your computer for:".
               "\r\n %d Milliseconds, or \r\n %d Seconds".
               "or \r\n %d mins or\r\n %d hours %d mins.",
               $ticks,
               $secs,
               $mins,
               $hours,
               $mins - ($hours*60));

// Display a message box with only an OK button and the uptime text
MessageBoxA(NULL,
           $str,
           "Uptime Information",
           MB_OK);
?>


You can't Use Win32api Via Php for creating internet sites... I think it can be used onley with Active-x dll or Active-x controls in your visual studio, but not for web pages...

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. php php_w32api - 0.05 hr back. (1)
  2. how to use dll in php - 1.13 hr back. (1)
  3. php api windows - 29.91 hr back. (1)
  4. php use win32 api - 54.51 hr back. (2)
  5. php win32 api registry - 76.13 hr back. (1)
  6. php win32 api - 8.33 hr back. (3)
  7. php win32api - 10.41 hr back. (2)
  8. win32 api php - 110.95 hr back. (1)
  9. php win32 api login - 142.67 hr back. (1)
  10. php_w32api.dll - 40.90 hr back. (3)
  11. "win32api" "php" - 202.15 hr back. (1)
  12. win32api php - 78.94 hr back. (3)
  13. w32api_register_function - 223.13 hr back. (1)
  14. load user32 dll php - 223.45 hr back. (1)
Similar Topics

Keywords : win32api php


    Looking for win32api, php

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for win32api, php

*MORE FROM TRAP17.COM*
advertisement



How To Use Win32api Via Php



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE