WordPressは単にウェブページ生成ツールとして使うのだけではなく、外部APIと連携するためのツールとしても使うことができます。 今回は、外部のデータを取得するときに役立つwp_remote_post関数について解説します。 by 馬場美由紀 (CodeIQ中の人) WordPressで外部API連携できる便利な関数 WordPressはウェブサイト作成によく利用されているソフトウェアです。単にウェブサイトを作るだけでなく、外部サービスとの連携も視野に入れたアプリケーションとして利用することもできます。今回はWordPressを利用して、外部サービスのAPIにアクセスし、その結果を出力する、というコードを作成してみます。 APIを使う例として、livedoor天気情報にアクセスして、天気情報を取得します。livedoor天気情報を例に取り上げた理由は、デベロッパ登録等が不要で、試しやす