krishean

GetTickCount.php

Mar 5th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(E_ALL);
  4. set_time_limit(120);
  5.  
  6. $kernel32 = FFI::cdef("
  7. typedef unsigned long   DWORD;
  8. DWORD GetTickCount();
  9. ", "kernel32.dll");
  10.  
  11. $user32 = FFI::cdef("
  12. typedef unsigned int    UINT;
  13. typedef const char *    LPCSTR;
  14. typedef void *          HANDLE;
  15. typedef HANDLE          HWND;
  16. int MessageBoxA(HWND,LPCSTR,LPCSTR,UINT);
  17. ", "user32.dll");
  18.  
  19. exit(main());
  20. function main(){
  21.     global $kernel32, $user32;
  22.    
  23.     $count = $kernel32->GetTickCount();
  24.     echo($user32->MessageBoxA(NULL, "The tick count is " . $count, "Ticky Ticky", 1) . "\n");
  25.    
  26.     return 0;
  27. }
  28.  
  29. ?>
Add Comment
Please, Sign In to add comment