htmlリンクは次のとおりです。
<a title="Next page of results" class="sprBtnSRP1 enabled" href="http://www.link.com/page.html?thisisthelink&_pgn=2&_al=25&at=tc"><i>Next</i><b class="sprBtnSRP1"></b></a>
PHPは次のとおりです。
function NextLink($url){
$html= WGET($url);
$urlpattern1 = '/Next"><a[^>]+pgn=([^"]+)/i';
preg_match_all($urlpattern1, $html, $matches1);
$nextlink='http://www.link.com/page.html?thisisthelink&_pgn=';
foreach ($matches1[1] as $u) {
$nextlink = $nextlink.$u;
}
return $nextlink;
}
===============
はもう機能していません。私が必要としているのは、PHPで$nexlink。$uになることです。http://www.link.com/page.html?thisisthelink&_pgn=2&_al=25&at=tc
問題は$urlpattern1です
よろしくお願いします!