dragonmeng2002 2012-07-27 02:28
浏览 69
已采纳

C#程序使用PHP服务器

Just curious about the best way to go about this. I want to make a webpage that shows the amount of time it takes to ping all the machines on my network. I want a C# program to do the pinging and report it to the webpage. I want to be able to click "Re-ping" on the webpage and the program rerun the test. What is the best way to go about this?

The biggest issue is how to get things from the user to the C# program.

I can make the program post on the server, and the server show the user, like below.

User <----> PHP Host <---- C# Program

However how could I get data to go the other way?

PHP Host ---?-->C# Program

Am I thinking about this all wrong?

I do want the pinging and other things to be handled by a C# program as it has far more complex functionality (threading, connections, etc) than a PHP host that is interpreted as it is requested.

Is it possible that I could let the C# program return pages to users and avoid a PHP server all-togeather?

Any ideas are welcomed.

  • 写回答

1条回答 默认 最新

  • douwanc63652 2012-07-27 02:41
    关注

    You have many options. If you want to avoid using a PHP server the simplest would probably be to write a simple http server similar to this. Other options include using ASP.NET with a C# backend, or a webservice, which would be accessed from the PHP script or directly by a client application.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器