<?php
/**
* Rinza_IEサンプルプログラム
*
* <p>Tyzohサイト(http://www.tyzoh.jp/)のトップページからリンク情報を抽出して出力する</p>
* @author Y. Kurei
* @copyright Copyright (c) 2006, Nihon Unisys, Ltd.
* @license http://www.tyzoh.jp/rinza/licenses/LICENSE-1.0.txt Rinza Public License
*/
require_once 'Rinza/IE/Spider.php';
// Proxy設定:ご使用の環境に応じた値に変更してください(Proxyを経由しない場合:NULL)
$http_proxy_host = 'proxy.xxxxx.jp';
$http_proxy_port = '8080';
// コンテンツ取得先URLの設定
$target_URL = 'http://www.tyzoh.jp/';
// コンテンツ取得
$request_params = array(
'proxy_host' => $http_proxy_host,
'proxy_port' => $http_proxy_port
);
$contents = $spider->getSignificantContent();
// 取得コンテンツからのリンク情報抽出
$contents_cnt =
count($contents);
$all_link = array();
for ($i = 0; $i < $contents_cnt; $i++) {
$scraper->setString($contents[$i]['content']);
}
// 抽出したリンク情報の出力
/**
* This Program is distributed under version 1.0 of the Rinza Public
* License Agreement, that is bundled with this package in the file
* LICENSE, and is available through the website at the following URL:
* http://www.tyzoh.jp/rinza/licenses/LICENSE-1.0.txt.
*
* This is the Original Program.
* The Initial Developer of the Original Program is Nihon Unisys, Ltd.
* The Original Program is copyrighted (C) 2006 by Nihon Unisys, Ltd. with
* all rights reserved.
* There is NO WARRANTY OF ANY KIND by the Initial Developer of the
* Original Program.
*/
?>