<?php $id=$_GET["id"];//基金id号 $time=time(); $u1="http://fund.eastmoney.com/data/funddataforgznew.aspx?t=basewap&cb=jsonp&fc=".$id."&rt=".$time; $u2="http://hq.sinajs.cn/?_=".$time."/&list=f_".$id; $r1=file_get_contents($u1); $r2=file_get_contents($u2); $a1=explode("jsonp(",$r1); $a11 = explode(")",$a1[1]); $a12 = $a11[0]; $a13 = Json_decode($a12); $a14 = $a13->gsz; $a2=explode(",",$r2); $a21 = $a2[1]; $mailsubject = "估计:".$a14.","."当前:".$a21; echo $mailsubject; ?>
测试地址:华安宝利配置
说明:id换成自己的基金id,buy=购买时候的成本价格