DELPHI写的天气预报程序
右脚小拇指 2014-03-23 10:07:30 我的部分代码如下 (主要是取气象台中的天气预报 )
url := 'http://m.weather.com.cn/data/101210101.html';
HttpReq.open('get', Url, False, EmptyParam, EmptyParam);
HttpReq.send(EmptyParam);//开始搜索
Url := IdHTTP1.Get(url);// HttpReq.responseText;
vJson:=so(url);
if vJson['weatherinfo'].AsString<>'' then
begin
vJson:=so(vJson['weatherinfo'].AsString);
memo1.Lines.Add('城市:'+vJson['city'].AsString );
为什么每次连接 'http://m.weather.com.cn/data/101210101.html' 得到的都是2013年3月4号的信息.
如果谁有这方面 的源码, 请发一段给我看看 . 谢谢大家
{"weatherinfo":{"city":"杭州","city_en":"hangzhou","date_y":"2014年3月4日","date":"","week":"星期