douyou2368 2011-01-21 22:06
浏览 61
已采纳

通过PHP(curl)或jQuery发送POST信息 - IP问题 -

Im sending post info by using php curl. its okay. no problem. however it sends server's IP. this is a problem for me.

jquery is sending post info with user's IP, however jQuery have cross domain problem. it is not sending post info to another domain. It only works for same domain.

I wanna send post info (to another domain) + user ip (not server ip). Id like to learn your advices... Well, is there any other ways to make this job?

Thanks, Regards.

  • 写回答

4条回答 默认 最新

  • dongshao1156 2011-01-21 22:09
    关注

    The only way to do this is to have a form on the web page that points to the specified resource, give it a POST method, and submit it.

    If you don't want the entire page to reload, use an iframe.

    <iframe id="myiframe"></iframe>
    
    <form action="http://some-other-site.com/page.php" method="post" target="myiframe">
    ....
    

    You will, however, not be able to access the results the site outputs - again due to the cross domain / single origin policy.

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

报告相同问题?

悬赏问题

  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目