通过win32api对象“调用那个DLL来读取本地的信息”
你所谓“本地”是指哪里,需致意到php是运行与“服务器”中的

解决方案 »

  1.   

    例子 1. 得到系统持续运行的时间,并把它显示在消息对话框中
    <?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);
    ?> w32api_deftype -- 为 w32api_functions 函数定一个类型
    w32api_init_dtype --  创建了一个数据类型的实例,并且将函数传入的值填入其中 
    w32api_invoke_function -- 带有一个参数的执行一个函数,参数传递在函数名的后面
    w32api_register_function -- 从函数库中使用 PHP 注册一个函数 function_name
    w32api_set_call_method -- 设置调用的方法
      

  2.   

    我所说的本地是客户端的某个文件;如果用那个方法的话,每次需要把DLL文件下载到本地,那么是否会造成危险?
      

  3.   

    而且这个是调用win32api的对象,但是我系统是UNIX的,时候同样有对UNIX的系统API进行操作传递数据的函数或者方法呢?
      

  4.   

    1、php无法执行客户端的dll
    2、既然是UNIX,那拿来的dll
      

  5.   

    在UNIX下不是DLL,其实就是希望可以用PHP于UNIX下的API进行通话交流,是否能够实现?uuq(杜牧)所说的编成so文件是什么意思?
      

  6.   

    楼主说得是 浏览器插件.
    用插件读本地数据.
    在插件中建立一个 socket 连接并发送数据就可以了.
    这个不是PHP问题.