前に、こんなエントリーも書いているのですが、
・PHPでWEBページのタイトルを抜き出すサンプル
もっとお手軽にYahoo!Pipesで取得できるようにしてみました。
Pipes: getPageTitle
使い方
urlをパラメータで渡してあげるだけです。
例)http://pipes.yahoo.com/yager/get_page_title?url=http://creazy.net/
JSONPで取得する場合はこんな感じ、
http://pipes.yahoo.com/yager/get_page_title?_render=json&_callback=func&url=http://creazy.net/
さらに、PipesではPHPシリアライズも使えるので、
<?php
$url        = "http://creazy.net/";
$req        = "http://pipes.yahoo.com/yager/get_page_title?_render=php&url=".urlencode($url);
$serialized = file_get_contents($req);
$list       = unserialize($serialized);
if ( count($list["value"]["items"]) ) {
// ページタイトルはtitleタグに入っている
echo $list["value"]["items"][0]["title"]."\n";
}
var_dump($list);
?>
こんな感じでも呼び出せる。
いまのところ自分でも使い道ないんだけど、多分別のPipesから呼び出す時に重宝する(はず)

 
											 
											 
											 
											 
											 
											 
											