作业帮 > 作文素材 > 教育资讯

濮阳天气预报

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/02 11:39:40 作文素材
濮阳天气预报作文素材

篇一:雨雪天气出行注意事项2015.11.24

温馨提示:

雨雪天气出行注意事项

(2015年11月24日)

根据濮阳市天气预报,近三天均会有大雪天气。雨雪天气极易引起道路结冰、地面湿滑,影响交通和人们的正常生活,雨雪天气确保出行安全是第一位的。为保障您的出行安全,避免安全事故的发生,雨雪天气出行应注意以下事项:

一、行走,速度不要太快

雨雪天气步行速度不要太快,要走人行道,不要走大理石路面、在机动车道上行走,防止被侧滑的车碰到。切忌提重物,双手不要揣在兜里,因为双手来回摆动能对身体起到平衡作用。女士不要穿高跟鞋,出门时尽可能换上鞋底粗糙、有花纹的平底鞋,还要尽量避过大理石路面。如果突然摔倒,尽量别用手腕去支撑地面,也不要急着起来,应检查一下身体哪些部位疼痛。一旦摔倒发生骨折,切不可乱揉乱动,应用围巾、书本等工具固定好骨折部位,请求他人帮助,立即到附近医院治疗。

二、骑车,车胎气勿太足

雪天路滑,尽可能不要车自行车或电动车出行,确需骑自行车、电动车出行时,一定要先检查车闸是否灵敏,骑车时要保持高度集中注意力,车体不要携带过多、过重的物品,更不要带人;车胎气不可太足,将气放至平时充气量的2/3为好,增加车轮与地面的接触面可防止打滑;尽量放低车座,降低重心;与前面车辆保持3米以上距离,防止前车滑倒绊着自己;不要急捏刹车,可骑得慢一点,遇见情况早下车;尽量避免急转弯,在道路许可的范围内转弯,半径越大越安全;切勿与机动车抢道,防止被发生侧滑的机动车碰伤;遇到特别湿滑路段,最好下车推着走。

三、驾车,保持安全距离

雪天路面极易结冰或湿滑,汽车轮胎与地面的摩擦系数降低,容易出现车轮打滑的情况。应尽可能不驾驶机动车辆出行,特别是上高速公路。确需驾驶机动车出行时,驾驶人员应严格遵守限速规定,降低速度,遵守各行其道的原则。车速过快的情况下,急踩刹车、急打方向,都容易导致车辆失控。特别是在高速公路上行驶时更需注意,一定要保持车距,不要随意变道,更不能超速行驶。

另,雨雪天气驾驶人员视野不好,很容易因为看不清路况而导致事故发生。因此车辆之间及车辆与行人之间都要保持充分的安全距离,不要跟得太紧,更不要随便超车。如果行车过程中风挡出现起雾情况,可开冷风,将出风口的风向调到吹挡风玻璃的位置上,雾气便会消失。

注意事项:

一是提前检查好制动、转向、大灯、应急灯、轮胎、雨刮器等部件,确保车况良好。

二是应减速慢行,与前车保持一定的安全距离。

三是变道时提前开启转向灯,待后方无车迅速进入导向车道行驶。

四是下坡时不能空挡滑行,避免刹不住车。

五是行车切记不能猛踩刹车,猛打方向,避免车辆侧滑翻车。 六是不能随意超车和违章变道。

四、酒后,不要出行

切记酒后尽可能不要出行,确需出行时,最好有人陪伴,不要骑车,更不能驾驶机动车辆。

综合管理室全体员工祝您上下班走路、驾车、骑车顺利、安全!

篇二:开源免费天气预报接口API以及全国所有地区代码

开源免费天气预报接口API以及全国所有地区代码 国家气象局提供的天气预报接口

接口地址:

对于第三个接口,返回信息比较全面,也是以json格式提供,格式如下

{"weatherinfo": {

//基本信息;

"city":"北京","city_en":"beijing",

"date_y":"2012年2月16日","date":"","week":"星期四","fchh":"11","cityid":"101010100",

//摄氏温度

"temp1":"2℃~-7℃",

"temp2":"1℃~-7℃",

"temp3":"4℃~-7℃",

"temp4":"7℃~-5℃",

"temp5":"5℃~-3℃",

"temp6":"5℃~-2℃",

//华氏温度;

"tempF1":"35.6℉~19.4℉",

"tempF2":"33.8℉~19.4℉",

"tempF3":"39.2℉~19.4℉",

"tempF4":"44.6℉~23℉",

"tempF5":"41℉~26.6℉",

"tempF6":"41℉~28.4℉",

//天气描述;

"weather1":"晴",

"weather2":"晴",

"weather3":"晴",

"weather4":"晴转多云",

"weather5":"多云",

"weather6":"多云转阴",

//天气描述图片序号

"img1":"0",

"img2":"99",

"img3":"0",

"img4":"99",

"img5":"0",

"img6":"99",

"img7":"0",

"img8":"1",

"img9":"1",

"img10":"99",

"img11":"1",

"img12":"2",

"img_single":"0",

//图片名称;

"img_title1":"晴",

"img_title2":"晴",

"img_title3":"晴",

"img_title4":"晴",

"img_title5":"晴",

"img_title6":"晴",

"img_title7":"晴",

"img_title8":"多云",

"img_title9":"多云",

"img_title10":"多云",

"img_title11":"多云",

"img_title12":"阴",

"img_title_single":"晴",

//风速描述

"wind1":"北风3-4级转微风",

"wind2":"微风",

"wind3":"微风",

"wind4":"微风",

"wind5":"微风",

"wind6":"微风",

//风速级别描述

"fx1":"北风",

"fx2":"微风",

"fl1":"3-4级转小于3级",

"fl2":"小于3级",

"fl3":"小于3级",

"fl4":"小于3级",

"fl5":"小于3级",

"fl6":"小于3级",

//今天穿衣指数;

"index":"冷",

"index_d":"天气冷,建议着棉衣、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣或冬大衣。",

//48小时穿衣指数

"index48":"冷",

"index48_d":"天气冷,建议着棉衣、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣或冬大衣。",

//紫外线及48小时紫外线

"index_uv":"弱",

"index48_uv":"弱",

//洗车

"index_xc":"适宜",

//旅游

"index_tr":"一般",

//舒适指数

"index_co":"较不舒适",

"st1":"1",

"st2":"-8",

"st3":"2",

"st4":"-4",

"st5":"5",

"st6":"-5",

//晨练

"index_cl":"较不宜",

//晾晒

"index_ls":"基本适宜",

//过敏

"index_ag":"极不易发"}}

全国各城市代码如下:

北京:101010100朝阳:101010300顺义:101010400怀柔:101010500通州:101010600昌平:101010700延庆:101010800丰台:101010900石景山:101011000大兴:101011100房山:101011200密云:101011300门头

沟:101011400平谷:101011500八达岭:101011600佛爷顶:101011700汤河口:101011800密云上甸子:101011900斋堂:101012000霞云岭:101012100北京城区:101012200海淀:101010200天津:101030100宝坻:101030300东丽:101030400西青:101030500北辰:101030600蓟县:101031400汉沽:101030800静海:101030900津南:101031000塘沽:101031100大港:101031200武清:101030200宁河:101030700上海:101020100宝山:101020300嘉定:101020500南汇:101020600浦东:101021300青浦:101020800松江:101020900奉贤:101021000崇明:101021100徐家汇:101021200闵行:101020200金山:101020700石家庄:101090101张家口:101090301承

德:101090402唐山:101090501秦皇岛:101091101沧州:101090701衡水:101090801邢台:101090901邯郸:101091001保定:101090201廊坊:101090601郑州:101180101新乡:101180301许昌:101180401平顶山:101180501信阳:101180601南阳:101180701开封:101180801洛阳:101180901商丘:101181001焦作:101181101鹤壁:101181201濮阳:101181301周口:101181401漯河:101181501驻马店:101181601三门峡:101181701济源:101181801安阳:101180201合肥:101220101芜湖:101220301淮南:101220401马鞍山:101220501安庆:101220601宿州:101220701阜阳:101220801亳州:101220901黄山:101221001滁州:101221101淮北:101221201铜陵:101221301宣城:101221401六安:101221501巢湖:101221601池州:101221701蚌埠:101220201杭州:101210101舟山:101211101湖州:101210201嘉兴:101210301金华:101210901绍兴:101210501台州:101210601温州:101210701丽水:101210801衢州:101211001宁波:101210401重庆:101040100合川:101040300南川:101040400江津:101040500万盛:101040600渝北:101040700北碚:101040800巴南:101040900长寿:101041000黔江:101041100万州天城:101041200万州龙宝:101041300涪陵:101041400开县:101041500城口:101041600云阳:101041700巫溪:101041800奉节:101041900巫山:101042000潼南:101042100垫江:101042200梁平:101042300忠

县:101042400石柱:101042500大足:101042600荣昌:101042700铜梁:101042800璧山:101042900丰都:101043000武隆:101043100彭水:101043200綦江:101043300酉阳:101043400秀山:101043600沙坪坝:101043700永川:101040200福州:101230101泉州:101230501漳州:101230601龙岩:101230701晋江:101230509南平:101230901厦门:101230201宁德:101230301莆田:101230401三明:101230801兰州:101160101平凉:101160301庆阳:101160401武威:101160501金昌:101160601嘉峪关:101161401酒泉:101160801天水:101160901武都:101161001临夏:101161101合作:101161201白银:101161301定西:101160201张掖:101160701广州:101280101惠州:101280301梅州:101280401汕头:101280501深圳:101280601珠海:101280701佛山:101280800肇庆:101280901湛江:101281001江门:101281101河源:101281201清远:101281301云浮:101281401潮州:101281501东莞:101281601中山:101281701阳江:101281801揭阳:101281901茂名:101282001汕尾:101282101韶关:101280201南宁:101300101柳州:101300301来宾:101300401桂林:101300501梧州:101300601防城港:101301401贵港:101300801玉林:101300901百色:101301001钦州:101301101河池:101301201北海:101301301崇左:101300201贺州:101300701贵阳:101260101安顺:101260301都匀:101260401兴义:101260906铜仁:101260601毕节:101260701六盘水:101260801遵义:101260201凯里:101260501昆明:101290101红河:101290301文山:101290601玉溪:101290701楚雄:101290801普洱:101290901昭通:101291001临沧:101291101怒江:101291201香格里拉:101291301丽江:101291401德宏:101291501景洪:101291601大理:101290201曲靖:101290401保山:101290501呼和浩特:101080101乌海:101080301集宁:101080401通辽:101080501阿拉善左旗:101081201鄂尔多斯:101080701临河:101080801锡林浩特:101080901呼伦贝尔:101081000乌兰浩特:101081101包头:101080201赤峰:101080601南昌:101240101上饶:101240301抚州:101240401宜春:101240501鹰潭:101241101赣州:101240701景德镇:101240801萍乡:101240901新余:101241001九江:101240201吉安:101240601武汉:101200101黄冈:101200501荆州:101200801宜昌:101200901恩施:101201001十堰:101201101神农架:101201201随州:101201301荆门:101201401天门:101201501仙桃:101201601潜江:101201701襄樊:101200201鄂州:101200301孝感:101200401黄石:101200601咸宁:101200701成都:101270101自贡:101270301绵阳:101270401南充:101270501达州:101270601遂宁:101270701广安:101270801巴中:101270901泸州:101271001宜宾:101271101内江:101271201资阳:101271301乐山:101271401眉山:101271501凉山:101271601雅安:101271701甘孜:101271801阿坝:101271901德阳:101272001广元:101272101攀枝花:101270201银川:101170101中卫:101170501固原:101170401石嘴山:101170201吴忠:101170301西宁:101150101黄南:101150301海北:101150801果洛:101150501玉树:101150601海西:101150701海东:101150201海南:101150401济南:101120101潍坊:101120601临沂:101120901菏泽:101121001滨州:101121101东营:101121201威海:101121301枣庄:101121401日照:101121501莱芜:101121601聊城:101121701青岛:101120201淄博:101120301德州:101120401烟台:101120501济宁:101120701泰安:101120801西安:101110101延安:101110300榆林:101110401铜川:101111001商洛:101110601安康:101110701汉中:101110801宝鸡:101110901咸阳:101110200渭南:101110501太原:101100101临汾:101100701运城:101100801朔州:101100901忻州:101101001长治:101100501大同:101100201阳泉:101100301晋中:101100401晋城:101100601吕梁:101101100乌鲁木齐:101130101石河子:101130301昌吉:101130401吐鲁番:101130501库尔勒:101130601阿拉尔:101130701阿克苏:101130801喀什:101130901伊宁:101131001塔城:101131101哈密:101131201和田:101131301阿勒泰:101131401阿图什:101131501博乐:101131601克拉玛依:101130201拉萨:101140101山南:101140301阿里:101140701昌都:101140501那

曲:101140601日喀则:101140201林芝:101140401台北县:101340101高雄:101340201台中:101340401海口:101310101三亚:101310201东方:101310202临高:101310203澄迈:101310204儋州:101310205昌江:101310206白沙:101310207琼中:101310208定安:101310209屯昌:101310210琼海:101310211文昌:101310212保亭:101310214万宁:101310215陵水:101310216西沙:101310217南沙岛:101310220乐东:101310221五指山:101310222琼山:101310102长沙:101250101株洲:101250301衡阳:101250401郴州:101250501常德:101250601益阳:101250700娄底:101250801邵阳:101250901岳阳:101251001张家界:101251101怀化:101251201黔阳:101251301永州:101251401吉首:101251501湘潭:101250201南京:101190101镇江:101190301苏州:101190401南通:101190501扬州:101190601宿迁:101191301徐州:101190801淮安:101190901连云港:101191001常州:101191101泰州:101191201无锡:101190201盐城:101190701哈尔滨:101050101牡丹江:101050301佳木斯:101050401绥化:101050501黑河:101050601双鸭山:101051301伊春:101050801大庆:101050901七台河:101051002鸡西:101051101鹤岗:101051201齐齐哈尔:101050201大兴安岭:101050701长春:101060101延吉:101060301四平:101060401白山:101060901白城:101060601辽源:101060701松原:101060801吉林:101060201通

化:101060501沈阳:101070101鞍山:101070301抚顺:101070401本溪:101070501丹东:101070601葫芦岛:101071401营口:101070801阜新:101070901辽阳:101071001铁岭:101071101朝阳:101071201盘锦:101071301大连:101070201锦州:101070701

篇三:课题_开源免费天气预报接口API以及全国所有地区代码

开源免费天气预报接口API以及全国所有地区代码 国家气象局提供的天气预报接口

接口地址:

对于第三个接口,返回信息比较全面,也是以json格式提供,格式如下

{"weatherinfo": {

//基本信息;

"city":"北京","city_en":"beijing",

"date_y":"2012年2月16日","date":"","week":"星期四","fchh":"11","cityid":"101010100",

//摄氏温度

"temp1":"2℃~-7℃",

"temp2":"1℃~-7℃",

"temp3":"4℃~-7℃",

"temp4":"7℃~-5℃",

"temp5":"5℃~-3℃",

"temp6":"5℃~-2℃",

//华氏温度;

"tempF1":"35.6℉~19.4℉",

"tempF2":"33.8℉~19.4℉",

"tempF3":"39.2℉~19.4℉",

"tempF4":"44.6℉~23℉",

"tempF5":"41℉~26.6℉",

"tempF6":"41℉~28.4℉",

//天气描述;

"weather1":"晴",

"weather2":"晴",

"weather3":"晴",

"weather4":"晴转多云",

"weather5":"多云",

"weather6":"多云转阴",

//天气描述图片序号

"img1":"0",

"img2":"99",

"img3":"0",

"img4":"99",

"img5":"0",

"img6":"99",

"img7":"0",

"img8":"1",

"img9":"1",

"img10":"99",

"img11":"1",

"img12":"2",

"img_single":"0",

//图片名称;

"img_title1":"晴",

"img_title2":"晴",

"img_title3":"晴",

"img_title4":"晴",

"img_title5":"晴",

"img_title6":"晴",

"img_title7":"晴",

"img_title8":"多云",

"img_title9":"多云",

"img_title10":"多云",

"img_title11":"多云",

"img_title12":"阴",

"img_title_single":"晴",

//风速描述

"wind1":"北风3-4级转微风",

"wind2":"微风",

"wind3":"微风",

"wind4":"微风",

"wind5":"微风",

"wind6":"微风",

//风速级别描述

"fx1":"北风",

"fx2":"微风",

"fl1":"3-4级转小于3级",

"fl2":"小于3级",

"fl3":"小于3级",

"fl4":"小于3级",

"fl5":"小于3级",

"fl6":"小于3级",

//今天穿衣指数;

"index":"冷",

"index_d":"天气冷,建议着棉衣、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣或冬大衣。",

//48小时穿衣指数

"index48":"冷",

"index48_d":"天气冷,建议着棉衣、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣或冬大衣。",

//紫外线及48小时紫外线

"index_uv":"弱",

"index48_uv":"弱",

//洗车

"index_xc":"适宜",

//旅游

"index_tr":"一般",

//舒适指数

"index_co":"较不舒适",

"st1":"1",

"st2":"-8",

"st3":"2",

"st4":"-4",

"st5":"5",

"st6":"-5",

//晨练

"index_cl":"较不宜",

//晾晒

"index_ls":"基本适宜",

//过敏

"index_ag":"极不易发"}}

全国各城市代码如下:

北京:101010100朝阳:101010300顺义:101010400怀柔:101010500通州:101010600昌平:101010700延庆:101010800丰台:101010900石景山:101011000大兴:101011100房山:101011200密云:101011300门头

沟:101011400平谷:101011500八达岭:101011600佛爷顶:101011700汤河口:101011800密云上甸子:101011900斋堂:101012000霞云岭:101012100北京城区:101012200海淀:101010200天津:101030100宝坻:101030300东丽:101030400西青:101030500北辰:101030600蓟县:101031400汉沽:101030800静海:101030900津南:101031000塘沽:101031100大港:101031200武清:101030200宁河:101030700上海:101020100宝山:101020300嘉定:101020500南汇:101020600浦东:101021300青浦:101020800松江:101020900奉贤:101021000崇明:101021100徐家汇:101021200闵行:101020200金山:101020700石家庄:101090101张家口:101090301承

德:101090402唐山:101090501秦皇岛:101091101沧州:101090701衡水:101090801邢台:101090901邯郸:101091001保定:101090201廊坊:101090601郑州:101180101新乡:101180301许昌:101180401平顶山:101180501信阳:101180601南阳:101180701开封:101180801洛阳:101180901商丘:101181001焦作:101181101鹤壁:101181201濮阳:101181301周口:101181401漯河:101181501驻马店:101181601三门峡:101181701济源:101181801安阳:101180201合肥:101220101芜湖:101220301淮南:101220401马鞍山:101220501安庆:101220601宿州:101220701阜阳:101220801亳州:101220901黄山:101221001滁州:101221101淮北:101221201铜陵:101221301宣城:101221401六安:101221501巢湖:101221601池州:101221701蚌埠:101220201杭州:101210101舟山:101211101湖州:101210201嘉兴:101210301金华:101210901绍兴:101210501台州:101210601温州:101210701丽水:101210801衢州:101211001宁波:101210401重庆:101040100合川:101040300南川:101040400江津:101040500万盛:101040600渝北:101040700北碚:101040800巴南:101040900长寿:101041000黔江:101041100万州天城:101041200万州龙宝:101041300涪陵:101041400开县:101041500城口:101041600云阳:101041700巫溪:101041800奉节:101041900巫山:101042000潼南:101042100垫江:101042200梁平:101042300忠

县:101042400石柱:101042500大足:101042600荣昌:101042700铜梁:101042800璧山:101042900丰都:101043000武隆:101043100彭水:101043200綦江:101043300酉阳:101043400秀山:101043600沙坪坝:101043700永川:101040200福州:101230101泉州:101230501漳州:101230601龙岩:101230701晋江:101230509南平:101230901厦门:101230201宁德:101230301莆田:101230401三明:101230801兰州:101160101平凉:101160301庆阳:101160401武威:101160501金昌:101160601嘉峪关:101161401酒泉:101160801天水:101160901武都:101161001临夏:101161101合作:101161201白银:101161301定西:101160201张掖:101160701广州:101280101惠州:101280301梅州:101280401汕头:101280501深圳:101280601珠海:101280701佛山:101280800肇庆:101280901湛江:101281001江门:101281101河源:101281201清远:101281301云浮:101281401潮州:101281501东莞:101281601中山:101281701阳江:101281801揭阳:101281901茂名:101282001汕尾:101282101韶关:101280201南宁:101300101柳州:101300301来宾:101300401桂林:101300501梧州:101300601防城港:101301401贵港:101300801玉林:101300901百色:101301001钦州:101301101河池:101301201北海:101301301崇左:101300201贺州:101300701贵阳:101260101安顺:101260301都匀:101260401兴义:101260906铜仁:101260601毕节:101260701六盘水:101260801遵义:101260201凯里:101260501昆明:101290101红河:101290301文山:101290601玉溪:101290701楚雄:101290801普洱:101290901昭通:101291001临沧:101291101怒江:101291201香格里拉:101291301丽江:101291401德宏:101291501景洪:101291601大理:101290201曲靖:101290401保山:101290501呼和浩特:101080101乌海:101080301集宁:101080401通辽:101080501阿拉善左旗:101081201鄂尔多斯:101080701临河:101080801锡林浩特:101080901呼伦贝尔:101081000乌兰浩特:101081101包头:101080201赤峰:101080601南昌:101240101上饶:101240301抚州:101240401宜春:101240501鹰潭:101241101赣州:101240701景德镇:101240801萍乡:101240901新余:101241001九江:101240201吉安:101240601武汉:101200101黄冈:101200501荆州:101200801宜昌:101200901恩施:101201001十堰:101201101神农架:101201201随州:101201301荆门:101201401天门:101201501仙桃:101201601潜江:101201701襄樊:101200201鄂州:101200301孝感:101200401黄石:101200601咸宁:101200701成都:101270101自贡:101270301绵阳:101270401南充:101270501达州:101270601遂宁:101270701广安:101270801巴中:101270901泸州:101271001宜宾:101271101内江:101271201资阳:101271301乐山:101271401眉山:101271501凉山:101271601雅安:101271701甘孜:101271801阿坝:101271901德阳:101272001广元:101272101攀枝花:101270201银川:101170101中卫:101170501固原:101170401石嘴山:101170201吴忠:101170301西宁:101150101黄南:101150301海北:101150801果洛:101150501玉树:101150601海西:101150701海东:101150201海南:101150401济南:101120101潍坊:101120601临沂:101120901菏泽:101121001滨州:101121101东营:101121201威海:101121301枣庄:101121401日照:101121501莱芜:101121601聊城:101121701青岛:101120201淄博:101120301德州:101120401烟台:101120501济宁:101120701泰安:101120801西安:101110101延安:101110300榆林:101110401铜川:101111001商洛:101110601安康:101110701汉中:101110801宝鸡:101110901咸阳:101110200渭南:101110501太原:101100101临汾:101100701运城:101100801朔州:101100901忻州:101101001长治:101100501大同:101100201阳泉:101100301晋中:101100401晋城:101100601吕梁:101101100乌鲁木齐:101130101石河子:101130301昌吉:101130401吐鲁番:101130501库尔勒:101130601阿拉尔:101130701阿克苏:101130801喀什:101130901伊宁:101131001塔城:101131101哈密:101131201和田:101131301阿勒泰:101131401阿图什:101131501博乐:101131601克拉玛依:101130201拉萨:101140101山南:101140301阿里:101140701昌都:101140501那

曲:101140601日喀则:101140201林芝:101140401台北县:101340101高雄:101340201台中:101340401海口:101310101三亚:101310201东方:101310202临高:101310203澄迈:101310204儋州:101310205昌江:101310206白沙:101310207琼中:101310208定安:101310209屯昌:101310210琼海:101310211文昌:101310212保亭:101310214万宁:101310215陵水:101310216西沙:101310217南沙岛:101310220乐东:101310221五指山:101310222琼山:101310102长沙:101250101株洲:101250301衡阳:101250401郴州:101250501常德:101250601益阳:101250700娄底:101250801邵阳:101250901岳阳:101251001张家界:101251101怀化:101251201黔阳:101251301永州:101251401吉首:101251501湘潭:101250201南京:101190101镇江:101190301苏州:101190401南通:101190501扬州:101190601宿迁:101191301徐州:101190801淮安:101190901连云港:101191001常州:101191101泰州:101191201无锡:101190201盐城:101190701哈尔滨:101050101牡丹江:101050301佳木斯:101050401绥化:101050501黑河:101050601双鸭山:101051301伊春:101050801大庆:101050901七台河:101051002鸡西:101051101鹤岗:101051201齐齐哈尔:101050201大兴安岭:101050701长春:101060101延吉:101060301四平:101060401白山:101060901白城:101060601辽源:101060701松原:101060801吉林:101060201通

化:101060501沈阳:101070101鞍山:101070301抚顺:101070401本溪:101070501丹东:101070601葫芦岛:101071401营口:101070801阜新:101070901辽阳:101071001铁岭:101071101朝阳:101071201盘锦:101071301大连:101070201锦州:101070701

篇四:微信天气预报接口代码

微信天气预报接口代码分享-微信公众平台接口开发(一

)

微信公众号开放平台,可以利用现在网络上的各种工具接口,为自己的微信公众平台增加亮点。天气查询,快递查询,手机归属地查询,身份证查询,公交查询,火车查询,健康指数查询,实时翻译(语音),百度百科,百度问答,人品计算,笑话……等接口开发都已经成熟了。

今天我们先来看看最简单普遍的微信天气预报功能

中国天气网天气预报接口(官方接口)

请求地址: http://m.weather.com.cn/data/101010100.html

首先我们创建一个类。

保存为:weather.class.php 天气预报的处理类

// 天气类

class getweather{

public function getw($str){

if ($code){

$content =

file_get_contents("http://m.weather.com.cn/data/{$code}.html");

if(!$content){

file_put_contents('weather.txt', '没有接受到天气数据', FILE_APPEND);

return '爱油,抱歉,暂时没有取到天气数据,请稍后再试'; }

$result=json_decode($content,true);

$info=$result['weatherinfo'];

//文本形式

$strw="{$info['date_y']} {$info['week']} \n{$info['city']}的天气情况\n";

$strw .= "今天:

({$info['temp1']}){$info['weather1']}{$info['wind1']}{$info['fl1']}。\n";

$strw .= "明天:

({$info['temp2']}){$info['weather2']}{$info['wind2']}{$info['fl2']}。\n";

return $strw;

}else{

return '没有获取到该城市的天气,请确定输入了正确的城市名称,如\'福州天气\'';

}

}

/**

* 验证接受到的数据是否合法

* @param string $str 传入的接受到的数据

* @return mixed|boolean 有数据返回$code,没有数据返回false; *

*/

private function check($str){

// 引入天气代码数组

include"city_code.php";

if (is_array($CSArr)) {

return array_search($str, $CSArr);

}else {

return false;

}

}

}

?>

返回数据说明:

JSON格式解释

{

"weatherinfo":{

"city":"北京",

"city_en":"beijing",

"date_y":"2013年6月21日",

"date":"",

"week":"星期五",

"fchh":"08",

"cityid":"101010100",

"temp1":"29℃~23℃","temp2":"26℃~20℃","temp3":"24℃~20℃","temp4":

"25℃~20℃","temp5":"24℃~21℃","temp6":"25℃~22℃",

"tempF1":"84.2℉~73.4℉","tempF2":"78.8℉~68℉","tempF3":"75.2℉~68℉","tempF4":"77℉~68℉",

"tempF5":"75.2℉~69.8℉","tempF6":"77℉~71.6℉",

"weather1":"阵雨转中雨","weather2":"中雨转小雨","weather3":"小雨","weather4":"小雨", "weather5":"小雨转阵雨","weather6":"阵雨转小雨",

"img1":"3","img2":"8","img3":"8","img4":"7","img5":"7","img6":"99","img7":"7",

"img8":"99","img9":"7","img10":"3","img11":"3","img12":"7","img_single":"3",

"img_title1":"阵雨","img_title2":"中雨","img_title3":"中雨","img_title4":"小雨","img_title5":

"小雨","img_title6":"小雨","img_title7":"小雨","img_title8":"小雨","img_title9":"小雨","img_title10":"阵雨","img_title11":"阵雨","img_title12":"小雨","img_title_single":"阵雨",

"wind1":"微风","wind2":"微风","wind3":"微风","wind4":"微风","wind5":"微风","wind6":

"微风","fx1":"微风","fx2":"微风",

"fl1":"小于3级","fl2":"小于3级","fl3":"小于3级","fl4":"小于3级","fl5":"小于3级","fl6":"小于3级",

"index":"热",

"index_d":"天气较热,建议着短裙、短裤、短套装、T恤等夏季服装。年老体弱者宜着长袖衬衫和单裤。",

"index48":"暖","index48_d":"较凉爽,建议着长袖衬衫加单裤等春秋过渡装。年老体弱者宜着针织长袖衬衫、马甲和长裤。",

"index_uv":"弱","index48_uv":"最弱",

"index_xc":"不宜",

"index_tr":"适宜",、

"index_co":"较不舒适",

"st1":"27","st2":"21","st3":"24","st4":"18","st5":"22","st6":"18",

"index_cl":"较不宜",

"index_ls":"不太适宜",

"index_ag":"不易发"

}

}

城市代码数组:可以单独放到一个文件里。 city_code.php

$CSArr = array(

"101010100"=>"北京",

"101020100"=>"上海",

"101030100"=>"天津",

"101040100"=>"重庆",

"101320101"=>"香港",

"101330101"=>"澳门",

"101050101"=>"哈尔滨",

"101050201"=>"齐齐哈尔",

"101050301"=>"牡丹江",

"101050901"=>"大庆",

"101050801"=>"伊春",

"101051301"=>"双鸭山",

"101051201"=>"鹤岗",

"101051101"=>"鸡西",

"101050401"=>"佳木斯", "101051002"=>"七台河&q

uot;, "101050601"=>"黑河", "101050501"=>"绥化", "101050701"=>"大兴安岭", "101060101"=>"长春", "101060301"=>"延吉", "101060201"=>"吉林", "101060901"=>"白山", "101060601"=>"白城", "101060401"=>"四平", "101060801"=>"松原", "101060701"=>"辽源", "101060603"=>"大安", "101060501"=>"通化", "101070101"=>"沈阳", "101070201"=>"大连", "101071401"=>"葫芦岛", "101071301"=>"盘锦", "101070501"=>"本溪", "101070401"=>"抚顺", "101071101"=>"铁岭", "101071001"=>"辽阳", "101070801"=>"营口", "101070901"=>"阜新", "101071201"=>"朝阳", "101070701"=>"锦州", "101070601"=>"丹东", "101070301"=>"鞍山", "101080101"=>"呼和浩特", "101081000"=>"呼伦贝尔", "101080901"=>"锡林浩特", "101080201"=>"包头", "101080601"=>"赤峰", "101081001"=>"海拉尔", "101080301"=>"乌海", "101080701"=>"鄂尔多斯", "101080501"=>"通辽", "101090101"=>"石家庄", "101090501"=>"唐山", "101090301"=>"张家口", "101090601"=>"廊坊", "101090901"=>"邢台", "101091001"=>"邯郸",

篇五:国家气象局免费天气预报接口,城市代码(JSON格式)

{

"城市代码": [

{

"省": "北京",

"市": [

{

"市名": "北京",

"编码": "101010100" },

{

"市名": "朝阳",

"编码": "101010300" },

{

"市名": "顺义",

"编码": "101010400" },

{

"市名": "怀柔",

"编码": "101010500" },

{

"市名": "通州",

"编码": "101010600" },

{

"市名": "昌平",

"编码": "101010700" },

{

"市名": "延庆",

"编码": "101010800" },

{

"市名": "丰台",

"编码": "101010900" },

{

"市名": "石景山", "编码": "101011000" },

{

"市名": "大兴",

"编码": "101011100"

{

"市名": "房山",

"编码": "101011200" },

{

"市名": "密云",

"编码": "101011300" },

{

"市名": "门头沟", "编码": "101011400" },

{

"市名": "平谷",

"编码": "101011500" },

{

"市名": "八达岭", "编码": "101011600" },

{

"市名": "佛爷顶", "编码": "101011700" },

{

"市名": "汤河口", "编码": "101011800" },

{

"市名": "密云上甸子", "编码": "101011900" },

{

"市名": "斋堂",

"编码": "101012000" },

{

"市名": "霞云岭", "编码": "101012100" },

{

"市名": "北京城区", "编码": "101012200"

{

"市名": "海淀",

"编码": "101010200" }

]

},

{

"省": "天津市",

"市": [

{

"市名": "天津",

"编码": "101030100" },

{

"市名": "宝坻",

"编码": "101030300" },

{

"市名": "东丽",

"编码": "101030400" },

{

"市名": "西青",

"编码": "101030500" },

{

"市名": "北辰",

"编码": "101030600" },

{

"市名": "蓟县",

"编码": "101031400" },

{

"市名": "汉沽",

"编码": "101030800" },

{

"市名": "静海",

"编码": "101030900" },

{

"市名": "津南",

"编码": "101031000" },

{

"市名": "塘沽",

"编码": "101031100" },

{

"市名": "大港",

"编码": "101031200" },

{

"市名": "武清",

"编码": "101030200" },

{

"市名": "宁河",

"编码": "101030700" }

]

},

{

"省": "上海",

"市": [

{

"市名": "上海",

"编码": "101020100" },

{

"市名": "宝山",

"编码": "101020300" },

{

"市名": "嘉定",

"编码": "101020500" },

{

"市名": "南汇",

"编码": "101020600" },

{

"市名": "浦东",

"编码": "101021300" },

{

"市名": "青浦",

"编码": "101020800" },

{

"市名": "松江",

"编码": "101020900" },

{

"市名": "奉贤",

"编码": "101021000" },

{

"市名": "崇明",

"编码": "101021100" },

{

"市名": "徐家汇", "编码": "101021200" },

{

"市名": "闵行",

"编码": "101020200" },

{

"市名": "金山",

"编码": "101020700" }

]

},

{

"省": "河北",

"市": [

{

"市名": "石家庄", "编码": "101090101" },

{

"市名": "张家口", "编码": "101090301" },

{

"市名": "承德",

"编码": "101090402" },

作文素材