Collect and organize the code, simple implementation of the weather and QQ online query. For reference only, welcome to shoot bricks.
- /*generate at Sun, Jan 2009 13:46:27 +0000
- Don ' t Modify me!
- Cache Name Citys
- Key:a5819c80f61198eabf3d3ffceec595de
- */
- $Citys =array (
- 54511 = ' Beijing ',
- 58367 = ' Shanghai ',
- 54517 = ' Tianjin ',
- 57516 = ' Chongqing ',
- 45005 = ' Hong Kong ',
- 45011 = ' Macau ',
- 50953 = ' Harbin ',
- 50745 = ' Qiqihar ',
- 54094 = ' Mudanjiang ',
- 50842 = ' Daqing ',
- 50774 = ' Yichun ',
- 50884 = ' Shuangyashan ',
- 50775 = ' Hegang ',
- 50978 = ' Jixi ',
- 50873 = ' Jiamusi ',
- 50971 = ' Qitaihe ',
- 50468 = ' Heihe ',
- 50853 = ' Suihua ',
- 50442 = ' daxinganling ',
- 54161 = ' Changchun ',
- 54172 = ' Jilin ',
- 54371 = ' Bss ',
- 50936 = ' Baicheng ',
- 54157 = ' Siping ',
- 50946 = ' Songyuan ',
- 54260 = ' Liaoyuan ',
- 50945 = ' Daan ',
- 54363 = ' Tonghua ',
- 54342 = ' Shenyang ',
- 54662 = ' Dalian ',
- 54453 = ' Huludao ',
- 54660 = ' Arthur ',
- 54346 = ' Benxi ',
- 54353 = ' Fushun ',
- 54249 = ' Tieling ',
- 54347 = ' Liaoyang ',
- 54471 = ' Yingkou ',
- 54237 = ' Fuxin ',
- 54324 = ' Chaoyang ',
- 54337 = ' Jinzhou ',
- 54497 = ' Dandong ',
- 54339 = ' Anshan ',
- 53463 = ' Hohhot ',
- 54102 = ' Xilin Hot ',
- 53446 = ' Baotou ',
- 54218 = ' Chifeng ',
- 50527 = ' Hailar ',
- 53512 = ' Wuhai ',
- 53543 = ' Ordos ',
- 54135 = ' Tongliao ',
- 53698 = ' Shijiazhuang ',
- 54534 = ' Tangshan ',
- 54401 = ' Zhangjiakou ',
- 54515 = ' Langfang ',
- 53798 = ' Xingtai ',
- 53892 = ' Handan ',
- 54616 = ' Cangzhou ',
- 54702 = ' Hengshui ',
- 54423 = ' Chengde ',
- 54602 = ' Baoding ',
- 54449 = ' Qinhuangdao ',
- 57083 = ' Zhengzhou ',
- 57091 = ' Kaifeng ',
- 57073 = ' Luoyang ',
- 57171 = ' Mesa ',
- 53982 = ' Jiaozuo ',
- 53990 = ' Hebi ',
- 53986 = ' Xinxiang ',
- 53898 = ' Anyang ',
- 54900 = ' Puyang ',
- 57089 = ' Xuchang ',
- 57186 = ' Luohe ',
- 57051 = ' Sanmenxia ',
- 57178 = ' Nanyang ',
- 58005 = ' Shangqiu ',
- 57297 = ' Xinyang ',
- 57195 = ' Zhoukou ',
- 57290 = ' Zhumadian ',
- 54823 = ' Jinan ',
- 54857 = ' Qingdao ',
- 54830 = ' Zibo ',
- 54774 = ' Weihai ',
- 54918 = ' Qufu ',
- 54938 = ' Linyi ',
- 54765 = ' Yantai ',
- 58024 = ' Zaozhuang ',
- 54806 = ' Liaocheng ',
- 54915 = ' Jining ',
- 54906 = ' Heze ',
- 54827 = ' Taian ',
- 54945 = ' Rizhao ',
- 54736 = ' dongying ',
- 54714 = ' Texas ',
- 54734 = ' Binzhou ',
- 54828 = ' Laiwu ',
- 54843 = ' Weifang ',
- 53772 = ' Taiyuan ',
- 53782 = ' Yangquan ',
- 53976 = ' Jincheng ',
- 53778 = ' Jinzhong ',
- 53868 = ' Linfen ',
- 53959 = ' Yuncheng ',
- 53882 = ' Changzhi ',
- 53578 = ' Shuozhou ',
- 53674 = ' Xinzhou ',
- 53487 = ' Datong ',
- 58238 = ' Nanjing ',
- 58357 = ' Suzhou ',
- 58356 = ' Kunshan ',
- 58259 = ' Nantong ',
- 58377 = ' Taicang ',
- 58349 = ' Wu County ',
- 58027 = ' Xuzhou ',
- 58346 = ' Yixing ',
- 58248 = ' Zhenjiang ',
- 58145 = ' Huaian ',
- 58352 = ' Changshu ',
- 58151 = ' Yancheng ',
- 58246 = ' Taizhou ',
- 58354 = ' Wuxi ',
- 58044 = ' Lianyungang ',
- 58245 = ' Yangzhou ',
- 58343 = ' Changzhou ',
- 58131 = ' Suqian ',
- 58321 = ' Hefei ',
- 58326 = ' Chaohu ',
- 58221 = ' Bengbu ',
- 58424 = ' Anqing ',
- 58311 = ' Liu'an ',
- 58236 = ' Chuzhou ',
- 58336 = ' ma On Shan ',
- 58203 = ' Fuyang ',
- 58433 = ' Xuancheng ',
- 58429 = ' Tongling ',
- 58116 = ' Huaibei ',
- 58334 = ' Wuhu ',
- 58122 = ' Suzhou ',
- 58224 = ' Huainan ',
- 58427 = ' Chizhou ',
- 57036 = ' Xian ',
- 53955 = ' Hancheng ',
- 57245 = ' Ankang ',
- 57127 = ' Hanzhong ',
- 57016 = ' Baoji ',
- 57048 = ' Xianyang ',
- 53646 = ' Yulin ',
- 57045 = ' Weinan ',
- 57143 = ' Shangluo ',
- 53947 = ' Tongchuan ',
- 53845 = ' Yanan ',
- 53614 = ' Yinchuan ',
- 53817 = ' Guyuan ',
- 53704 = ' Zhongwei ',
- 53518 = ' Shizuishan ',
- 53612 = ' Wuzhong ',
- 52889 = ' Lanzhou ',
- 52896 = ' Silver ',
- 53829 = ' Qingyang ',
- 52533 = ' Jiuquan ',
- 57006 = ' Tianshui ',
- 52679 = ' Wuwei ',
- 52652 = ' Zhangye ',
- 50741 = ' Gannan ',
- 52984 = ' Linxia ',
- 53915 = ' Pingliang ',
- 52995 = ' Dingxi ',
- 52675 = ' Jinchang ',
- 52866 = ' Xining ',
- 52754 = ' sea North ',
- 52737 = ' Hercynian ',
- 56065 = ' Huangnan ',
- 56043 = ' Fruit Luo ',
- 56029 = ' Yushu ',
- 52875 = ' Haidong ',
- 52856 = ' Hainan ',
- 57494 = ' Wuhan ',
- 57461 = ' Yichang ',
- 57498 = ' Huanggang ',
- 57447 = ' Enshi ',
- 57476 = ' Jingzhou ',
- 57362 = ' Shennongjia ',
- 57256 = ' Shiyan ',
- 57590 = ' xianning ',
- 57278 = ' Xiangfan ',
- 57482 = ' Xiaogan ',
- 57381 = ' Suizhou ',
- 58407 = ' Yellowstone ',
- 57377 = ' Jingmen ',
- 57496 = ' Ezhou ',
- 57679 = ' Changsha ',
- 57766 = ' Shaoyang ',
- 57662 = ' Changde ',
- 57972 = ' Chenzhou ',
- 57649 = ' Jishou ',
- 57780 = ' Zhuzhou ',
- 57763 = ' Loudi ',
- 57773 = ' Xiangtan ',
- 57674 = ' Yiyang ',
- 57866 = ' Yongzhou ',
- 57584 = ' Yueyang ',
- 57872 = ' Hengyang ',
- 57749 = ' Huaihua ',
- 57771 = ' Shaoshan ',
- 57558 = ' Zhangjiajie ',
- 58457 = ' Hangzhou ',
- 58450 = ' Huzhou ',
- 58549 = ' Jinhua ',
- 58563 = ' Ningbo ',
- 58646 = ' Yeosu ',
- 58453 = ' Shaoxing ',
- 58633 = ' Quzhou ',
- 58452 = ' Jiaxing ',
- 58660 = ' Taizhou ',
- 58477 = ' Zhoushan ',
- 58659 = ' Wenzhou ',
- 58606 = ' Nanchang ',
- 57786 = ' Pingxiang ',
- 58502 = ' Jiujiang ',
- 58637 = ' Shangrao ',
- 58617 = ' Fuzhou ',
- 57799 = ' Jian ',
- 58627 = ' Yingtan ',
- 57793 = ' Yichun ',
- 57796 = ' Xinyu ',
- 58527 = ' Jingdezhen ',
- 57993 = ' Ganzhou ',
- 58847 = ' Fuzhou ',
- 59134 = ' Xiamen ',
- 58927 = ' Longyan ',
- 58834 = ' Nanping ',
- 58846 = ' Ningde ',
- 58946 = ' Putian ',
- 59137 = ' Quanzhou ',
- 58828 = ' sanming ',
- 59126 = ' Zhangzhou ',
- 57816 = ' Guiyang ',
- 57806 = ' Anshun ',
- 57609 = ' Chishui ',
- 57713 = ' Zunyi ',
- 57741 = ' Tongren ',
- 56693 = ' Liupanshui ',
- 57707 = ' Bijie ',
- 57825 = ' Carey ',
- 57827 = ' Duyun ',
- 56294 = ' Chengdu ',
- 57602 = ' Luzhou ',
- 57504 = ' Neijiang ',
- 56571 = ' Liangshan ',
- 56171 = ' Aba ',
- 57313 = ' Bazhong ',
- 57206 = ' Guangyuan ',
- 56386 = ' Leshan ',
- 56196 = ' Mianyang ',
- 56198 = ' Deyang ',
- 56666 = ' Panzhihua ',
- 56287 = ' Yaan ',
- 56492 = ' Yibin ',
- 56396 = ' Zigong ',
- 56146 = ' Ganzi Prefecture ',
- 57328 = ' Dazhou ',
- 56298 = ' Ziyang ',
- 57415 = ' Guang ',
- 57405 = ' Suining ',
- 56391 = ' Meishan ',
- 57411 = ' Nanchong ',
- 59287 = ' Guangzhou ',
- 59493 = ' Shenzhen ',
- 59312 = ' Chaozhou ',
- 59082 = ' Shaoguan ',
- 59658 = ' Zhanjiang ',
- 59298 = ' Huizhou ',
- 59280 = ' Qingyuan ',
- 59289 = ' Dongguan ',
- 59473 = ' Jiangmen ',
- 59659 = ' Maoming ',
- 59278 = ' zhaoqing ',
- 59501 = ' Shanwei ',
- 59293 = ' Heyuan ',
- 59315 = ' Jieyang ',
- 59117 = ' Meizhou ',
- 59485 = ' Zhongshan ',
- 59269 = ' Deqing ',
- 59663 = ' Yangjiang ',
- 59471 = ' Yunfu ',
- 59488 = ' Zhuhai ',
- 59316 = ' Shantou ',
- 59431 = ' Nanning ',
- 57957 = ' Guilin ',
- 59051 = ' Yangshuo ',
- 59046 = ' Liuzhou ',
- 59265 = ' Wuzhou ',
- 59453 = ' Yulin ',
- 59254 = ' guiping ',
- 59065 = ' Hezhou ',
- 59632 = ' Qinzhou ',
- 59249 = ' Guigang ',
- 59635 = ' Fangchenggang ',
- 59211 = ' Baise ',
- 59644 = ' Beihai ',
- 59023 = ' Hechi ',
- 59242 = ' guest ',
- 59425 = ' Chongzuo ',
- 56778 = ' Kunming ',
- 56748 = ' Baoshan ',
- 56768 = ' Chuxiong ',
- 56844 = ' de macro ',
- 56975 = ' Red River ',
- 56951 = ' Lincang ',
- 56533 = ' Nujiang ',
- 56783 = ' Qujing ',
- 56964 = ' Simao ',
- 56994 = ' Wenshan ',
- 56875 = ' Yuxi ',
- 56586 = ' Zhaotong ',
- 56651 = ' Lijiang ',
- 56751 = ' Dali ',
- 59758 = ' Haikou ',
- 59948 = ' Sanya ',
- 59845 = ' Zhanzhou ',
- 59757 = ' Qiongshan ',
- 59941 = ' Tong-shi ',
- 59856 = ' Wenchang ',
- 51463 = ' Urumqi ',
- 51076 = ' Altay ',
- 51628 = ' Akzo ',
- 51368 = ' Changji ',
- 52203 = ' Hami ',
- 51828 = ' Hetian ',
- 51709 = ' Kashgar ',
- 51243 = ' Karamay ',
- 51356 = ' Shihezi ',
- 51133 = ' Tacheng ',
- 51656 = "Korla",
- 51573 = ' Turpan ',
- 55591 = ' Lhasa ',
- 55437 = ' Ali ',
- 56137 = ' The ",
- 55299 = ' A ',
- 55578 = ' Shigatse ',
- 55598 = ' Shannan ',
- 56312 = ' Linzhi ',
- 58968 = ' Taipei ',
- 59554 = ' Kaohsiung ',
- 17060 = ' Istanbul ISTANBUL ',
- 40754 = ' Tehran TEHRAN ',
- 41781 = ' Karachi KARACHI ',
- 42182 = ' New DELHI new DELHI ',
- 43466 = ' Colombo COLOMBO ',
- 47108 = ' Seoul SEOUL ',
- 47159 = ' Busan BUSAN ',
- 47662 = ' Tokyo Tonkin ',
- 48097 = ' Yangon YANGON ',
- 48454 = ' Bangkok BANGKOK ',
- 48647 = ' Kuala Lumpur KUALA Lumpur ',
- 48820 = ' Hanoi HA NOI ',
- 96745 = ' Jakarta JAKARTA ',
- 10141 = ' Hamburg HAMBURG ',
- 10381 = ' Berlin BERLIN ',
- 10637 = ' Frankfurt FRANKFURT ',
- 11034 = ' Vienna VIENNA ',
- 16066 = ' Milan MILANO ',
- 16235 = ' Roma Roma ',
- 16701 = ' Athens ATHENS ',
- 2484 = ' Stockholm STOCKHOLM ',
- 27612 = ' Moscow Moskva ',
- 3334 = ' Manchester MANCHESTER ',
- 3779 = ' London ',
- 6240 = ' Amsterdam AMSTERDAM ',
- 6451 = ' Brussels brusseles ',
- 6660 = ' Zurich ZURICH ',
- 6700 = ' Geneva GENEVE ',
- 61291 = ' Bamako Bamako ',
- 63450 = ' Addis Ababa ADDIS Ababa ',
- 63740 = ' Nairobi Nairobi ',
- 65472 = ' Accra Accra ',
- 67341 = ' Maputo MAPUTO ',
- 68368 = ' Johannesburg Johannesburg ',
- 68396 = ' Manzini Manzini ',
- 68816 ' Cape Town ',
- 71624 = ' Toronto TORONTO ',
- 71627 = ' Montreal MONTREAL ',
- 71628 = ' Ottawa OTTAWA ',
- 71892 = ' Vancouver VANCOUVER ',
- 72202 = ' Miami MIAMI ',
- 72219 = ' Atlanta ATLANTA ',
- 72243 = ' Houston HOUSTON ',
- 72295 = ' Los ANGELES ',
- 72386 = ' Las Vegas LAS VEGAS ',
- 72403 = ' Washington WASHINGTON DC ',
- 72503 = ' New York ',
- 72509 = ' Boston BOSTON ',
- 72530 = ' Chicago CHICAGO ',
- 72793 = ' Seattle SEATTLE ',
- 78264 = ' Santiago SANTIAGO DE CUBA ',
- 80222 = ' Bogota BOGOTA ',
- 84628 = Lima Lima ',
- 85799 = ' Monterey port PUERTO MONTT ',
- 87585 = ' Buenos Aires BUENOS AIRES ',
- 93110 = ' Oakland AUCKLAND ',
- 93436 = ' Wellington WELLINGTON ',
- 94767 = ' Sydney SYDNEY ',
- 94868 = ' Melbourne MELBOURNE ',
- 94926 = ' Canberra CANBERRA ',
- 59279 = ' Foshan ',
- 53753 = ' Luliang ',
- 51431 = ' Yining ');
- ?>
Copy Code
- Header (' Content-type:text/html;charset=utf-8 ');
- Require_once ' city.php ';
- @error_reporting (0);
- if ($_post[' submit '] = = = ' OK ')
- {
- $client = new SoapClient (' http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl ');
- $code = $_post[' city ');
- $code = ' Shenzhen ';
- $para = Array (' thecityname ' = = $code);
- $res = $client->__call (' Getweatherbycityname ', Array (' paramters ' = $para))->getweatherbycitynameresult- >string;
- echo "
"; - echo "City:". $res [1];
- echo "
Temperature: ". $res [5]; - echo "
Weather: ". $res [6]; - echo "
Wind: ". $res [7]; - echo "
";
- $QQ = $_post[' qqnum ');
- $QQ = ' 260558820 ';
- if (!empty ($QQ))
- {
- if (Preg_match ('/^\d+$/', $QQ))
- {
- $client = new SoapClient (' http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?wsdl ', Array (' Trace ' =>1) );
- $para = Array (' qqcode ' = = $QQ);
- $res = $client->__call (' Qqcheckonline ', Array (' paramters ' = $para))->qqcheckonlineresult;
- echo $qq. ' Present '. ($res = = ' Y '? ' Online ': ' Offline ');
- }
- Else
- {
- Echo ' wrong QQ number ';
- }
- }
- }
- ?>
Copy Code |