日期:2014-05-17  浏览次数:20428 次

百度指数PHP与Flash参数传递,请教如何获取百度指数flash数据?
请教如何获取百度指数flash数据?

http://index.baidu.com/main/word.php?word=跳舞鱼
我想得到传给flash的查询结果。
即每天查询“跳舞鱼”的次数.





好像涉及:FLASH获取数据默认都是有跨域限制,此PHP后台和flash之间的加密解密协议。
"PHP代理把数据用ExternalInterface传给FLASH。"
"百度指数的结果分析器来取得数值。"
我不太理解。
想请问如何下手。谢谢!

http://index.baidu.com/script/swf.js



<!--创建相关趋势Flash-->
<script language="javascript" type="text/javascript">
baidu.swf.create(
  {
  'id' : "trendFlash",
  'width' : "501",
  'height' : "390",
  'ver' : "9.0.0",
  'errorMessage' : "Please download the newest flash player.",
  'url' : "../fla/TrendAnalyser.swf",
  'bgColor' : "#FFFFFF",
  'wmode' : "opaque",
  'vars' : {
  keys:"web",
  areas:"0",
  periods:"2010-07-03|2010-08-01",
  periodNames:"null",
  shortKeys:"web",
  dv:1,
  nc:0,
  gateway:"http://index.baidu.com/gateway.php",
snapshot:"http://index.baidu.com/main/show.php"
  }
  },
  "trendFlashContainer");
</script>





http://index.baidu.com/fla/Trend ... ;periods=2010-07-03|2010-08-01&periodNames=null&shortKeys=%E6%96%B0%E9%97%BB&dv=1&gateway=http%3A%2F%2Findex.baidu.com%2Fgateway.php&snapshot=http%3A%2F%2Findex.baidu.com%2Fmain%2Fshow.php

------解决方案--------------------
这个我干过
你用firefox的插件live http header抓下包能看到,flash是从后台取数据,然后才生成曲线的,flash取的数据是一个xml文件,你可以通过分析这个xml文件来获取需要的数据