douliang9057 2014-11-17 23:11
浏览 31

在Linux主机上,FTP自身(来自PHP)是否会生成出站流量?

If I place a PHP script on a host, and in that script FTP a file (local to the script) to a FTP account also ending on that same host, my expectation is that the connection and transfer should be nearly instant as (I hope) no outbound traffic would be generated. But I don't have a way to test this. Is this really the case?

Update

  1. The FTP host is not localhost, or 127.0.0.1. Say we have a normal FTP account johndoe with a ******* password on thehost.com. On this same thehost.com we execute our out_of_jail.php script that will FTP /css/styles.css to thehost.com.
  2. This is supposed to work on host environments where the admin does not have access to /etc/hosts to add thehost.com.
  3. Let's define outbound traffic in the most restrictive way, by it, we mean traffic that goes out to the network card. So, if it goes out and returned as an inbound packet by some other device in the same network, it would still be considered as outbound traffic.
  • 写回答

1条回答 默认 最新

  • doure5236 2014-11-18 00:37
    关注

    If you point your FTP script to localhost or 127.0.0.1 then there should be no outbound traffic.

    If all you're trying to do is get a file from Point A to Point B on the same server via a PHP script, there are other ways to do that besides FTP as well. Of course I do not know all the specifics of your scope or needs, so maybe the FTP approach is right for you. But if you can't get it working, look in to some other options.

    评论

报告相同问题?

悬赏问题

  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗