doujing5435 2014-10-02 18:25
浏览 75

将数据从php服务器发送到vb.net客户端

I want to send data from online PHP website to a client program (vb.net, but can be another language) without request. I mean that I have a website where customers make something and receive these data on a desktop.

                    (no request)

PHP script from website -------------------------> vb.net on a desktop

Which is the best way for you? Can I use websockets or there are better and simple way to do this? Or I reads data from vb.net timing the task?

ty

  • 写回答

1条回答 默认 最新

  • douyueju2912 2014-10-02 19:01
    关注

    let me explain #one thing to you : if you want to send data to any PC or Any Client You Need to connect to it using IP on some port wich mean Client Device must be Forwarding the port you trying to access from and that may be difficult for some users , so i suggest that you use PHP Function called "Fopen()" use it to save data to some file in your website and make it readable like a text file and here Example :

    <?
    $inputString = "Data you want to send to Desktop";
    $fp = fopen( "yourfile.txt" , "w" );
    fwrite($fp, $inputString);
    fclose($fp);
    ?>
    

    and then just read the file from Desktop Client By visting the URL of the file :

    http://www.yoursite.com/path/yourfile.txt

    and the data will be there so after you get that data just Do What Ever You want with it.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败