$option = array(
'http' => array(
'method' => 'GET',
#参照元URLを設定
'header' => 'Referer: '.'http://参照元URL'."\r\n"
)
);
$context = stream_context_create($option);
#対象URLから$strにファイル内容を取得
$str = file_get_contents('http://対象URL', FALSE, $context);
【“[PHP] リファラ付きでURLからデータを取得”の続きを読む】
テーマ: Webデザイン - ジャンル: コンピュータ
