本文整理汇总了PHP中Crawler::cutafter方法的典型用法代码示例。如果您正苦于以下问题:PHP Crawler::cutafter方法的具体用法?PHP Crawler::cutafter怎么用?PHP Crawler::cutafter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Crawler
的用法示例。
在下文中一共展示了Crawler::cutafter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: crawl_indowebster
function crawl_indowebster($url)
{
//echo "'$url'";
$craw = new Crawler($url);
$craw->go2lineregexor('/(<\\/div><\\/a><\\/div><\\/div>)/', 1, 'href="#idws7"');
$setring = $craw->getbetween('location.href=\'', '\'');
$path = Crawler::extract($setring, 'path=', '&');
$file_orig = Crawler::cutafter($setring, 'file_orig=');
$craw->close();
return '<a href="' . dirname($setring) . '/' . $path . '">' . rawurldecode($file_orig) . '</a>';
}
示例2: go
public function go()
{
$mark1 = '<a target="_blank" title="Show fullsized image" href=';
$mark2 = '<a title="Next Image" rel="next" href=';
$host = 'http://lu.scio.us';
$finish = false;
$number = 0;
$url = $this->url;
preg_match('/\\/([^\\/]+)\\/page\\/1/', $url, $m);
$text = $m[1];
while (!$finish) {
echo $url . "<br/>\n";
flush();
$c = new Crawler($url);
$c->go_to('id="pid_');
while ($line = $c->readline()) {
if (Crawler::is_there($line, 'src="')) {
$img = Crawler::extract($line, 'src="', '"');
$img = str_replace('thumb_100_', @$_GET['big'] ? '' : 'normal__', $img);
$num = Crawler::pad(++$number, 3);
$filnm = basename($img);
$ext = Crawler::cutafter($filnm, '.');
// $text = $num . $ext;
// preg_match('/\/(\d+\/\d+)\//', $img, $m);
// $text = $m[1];
echo "<a href='{$img}'>{$text}</a><br/>\n";
flush();
} else {
if (Crawler::is_there($line, '</ul>')) {
break;
}
}
}
$c->go_to('class="pager"');
$c->readline();
if (Crawler::is_there($c->curline, 'Pager_next')) {
$finish = false;
$url = $host . Crawler::extract($c->curline, '<a rel="next" href="', '"');
} else {
$finish = true;
}
$c->close();
}
}
示例3: str_replace
echo @$prefix;
?>
"><br />
<input type="submit">
</form>
<?php
//http://mangahead.com/Manga-English-Scan/History-Strongest-Disciple-Kenichi/Historys-Strongest-Disciple-Kenichi-392-English-Scan
$sitename = "http://mangahead.com";
$pref = @$_POST['base'];
if (!Crawler::is_there($pref, '/index.php/')) {
$pref = str_replace($sitename . '/Manga', $sitename . '/index.php/Manga', $pref);
}
if (@$base) {
$finish = false;
if (Crawler::is_there($pref, '?page=')) {
$page = Crawler::cutafter($pref, '?page=');
$pref = Crawler::cutuntil($pref, '?page=');
} else {
$page = 1;
}
while (!$finish) {
echo "{$base}<br/>\n";
flush();
$c = new Crawler($base);
$c->go2linewhere('mangaviewer_toppest_navig');
if (Crawler::is_there($c->curline, ' ›')) {
$finish = false;
$base = $pref . '/?page=' . ++$page;
} else {
$finish = true;
}
示例4: back_url
public static function back_url($full)
{
return Crawler::cutafter($full, Crawler::site_name($full));
}