dps69208 2010-01-17 16:14
浏览 137
已采纳

从VB.NET应用程序发送文件到PHP脚本

I need to send some data from a SQL DB Server on an internal network to an external web server.

I was hoping to accomplish this by writing a VB.NET app that is invoked once per day that sends about 1 MB of data to a PHP script on the web server, where it is deposited in a database.

What is a good method to send data to a PHP script from a .NET app?

  • 写回答

5条回答 默认 最新

  • dongtang1944 2010-01-17 17:00
    关注

    You can use the HTTPWebRequest class to post a file to your php script just as a browser would. If the file you are sending is text based like XML or CSV, a simple post could be done. However, if you need to send binary data, you could either encode it base64 and then decode it on the other end in PHP, or post it as a file, using multipart forms. Unless you have a specific reason to be using multipart forms, it probably isn't worth all the extra trouble, and you should probably just encode your data with base64.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录