dongyuxiao6295 2019-03-08 10:41
浏览 880

cURL输出中“local_ip”和“primary_ip”的含义是什么?

I am trying to connect to a site with curl but it returns error 503.

I thought maybe the site blocked my IP. I bought another IP for my VPS and connected with this IP to that site but still I can not connect and have the same error.

I view the cURL output and see two my requests have the same primary IP but different local IP.

The primary IP is not in my purchased IP list. What does primary IP represent in the cURL output?

Array ( 
  [url] => http://adsl.tci.ir/ 
  [content_type] => text/html; charset=UTF-8 
  [http_code] => 302 
  [header_size] => 366 
  [request_size] => 50 
  [filetime] => -1 
  [ssl_verify_result] => 0 
  [redirect_count] => 0 
  [total_time] => 0.01543 
  [namelookup_time] => 0.004182 
  [connect_time] => 0.0057 
  [pretransfer_time] => 0.005737 
  [size_upload] => 0 
  [size_download] => 13458 
  [speed_download] => 872197 
  [speed_upload] => 0 
  [download_content_length] => -1 
  [upload_content_length] => 0 
  [starttransfer_time] => 0.015135 
  [redirect_time] => 0 
  [redirect_url] => http://adsl.tci.ir/panel 
  [primary_ip] => 217.218.86.7 
  [certinfo] => Array ( ) 
  [primary_port] => 80 
  [local_ip] => 185.208.174.63 
  [local_port] => 57646 
)
  • 写回答

1条回答 默认 最新

  • douzhan1963 2019-03-08 10:44
    关注

    The local IP is the IP local to you. i.e. it is your IP address.

    The primary IP is the IP you are making the request to. i.e. it is the IP that adsl.tci.ir resolves to.

    [ ~ ] ➜  host adsl.tci.ir
    adsl.tci.ir has address 217.218.86.7
    
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料