OPEN API

야후 날씨 API

ssNi 2013. 3. 11. 17:06

위도, 경도 입력하면 날씨 정보 불러오기

로직관련...

http://qnibus.com/blog/%EB%82%A0%EC%94%A8-api-%EA%B3%BC%EC%97%B0-%EC%96%B4%EB%94%94%EB%A5%BC-%EC%8D%A8%EC%95%BC%ED%95%A0%EA%B9%8C/


개발 참고사이트

http://developer.yahoo.com/weather/

http://pkarl.com/articles/parse-yahoo-weather-rss-using-php-and-simplexml-al/

http://tutorialzine.com/2012/05/weather-forecast-geolocation-jquery/

야후  api관련 사이트

http://developer.yahoo.com/boss/geo/

http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf

http://developer.yahoo.com/forum/General-Discussion-at-YDN/Finding-weather-through-latitude-and-longitude-/1251241309000-b861757e-dc3c-3336-8407-3c2ddcb2ad1b

http://developer.yahoo.com/blogs/ydn/categories/tutorials/

http://developer.yahoo.com/geo/geoplanet/guide/concepts.html


//step 1. input parameter : 위도 경도

https://developer.apps.yahoo.com/wsregapp/?view

// yahoo geo api 사용해서 <city></city> 데이터 가지고 오기

//output parameter : city

http://where.yahooapis.com/geocode?location=".$lat.",".$long."&flags=X&gflags=R&appid=app_id

flags가 X이면 xml, J이면 json

//step 2. input parameter : city

//yahoo yql 사용해서 city명으로 woeid 데이터 가지고 오기

//outparameter : w

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text=%22"나라이름"%22&format=xml


//step 3. input parameter : w

//yahoo weather api 사용해서 날씨 데이터 가지고 오기

http://weather.yahooapis.com/forecastrss?w=woeid


xml 파싱 시 

1. xml 구조 파악

<result>

<a></a>

</result>

a=file_get_contents(파싱할 주소);

b=simplexml_load_string(a);

b->result->a;

참고 사이트 : http://blog.naver.com/ssik425?Redirect=Log&logNo=10139785905


<접두어:엘리먼트> 형태는 유튜브 xml parsing 방법과 동일함.

http://blog.naver.com/yukimaro?Redirect=Log&logNo=10038727644


image 주소를 가져오는 정규식

http://freeimage.kr/bbs/board.php?bo_table=tip_preg&wr_id=5

'OPEN API' 카테고리의 다른 글

open api 링크들  (0) 2013.03.31
유튜브, 구글리더, 페이스북 검색 api  (0) 2013.03.31
twitter api 사용법  (0) 2013.03.31
api 관련 사이트  (0) 2013.03.12
날씨 API 관련 사이트  (0) 2013.03.11