7*4 2014-12-14 20:01 采纳率: 50%
浏览 137

从ajax响应获取数据

I'm trying to get data from ajax script. I mean I have a web-site which contains some comments. I want to get them. Ajax script downloads them using post-request. I tried do this :

curl -d "data" -H "Accept: application/xml" POST url

But this request returns only main page of that site. I hope you can help me. Thanks.

  • 写回答

1条回答 默认 最新

  • weixin_33709219 2014-12-14 20:09
    关注

    Try to insert in every comment box a name attribute like

    name="user"
    

    then,in your php page,insert the global variable

    $_POST["user"]

    after POST you must insert the name of the comment box you inserted. to show the comment or to save the comment try to save the value in a variable like this

    value=$_POST["user"]
    

    then make what you want of this variable.You can save this variable in a txt file too.

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b