コード例 #1
0
						{{ Form::input('text','url',null,array('placeholder'=>'e.g: http://www.bing.com')) }}
					</div>
					<div class="eight wide field">
						<label>Follows Rule</label>
						{{ Form::input('text','rule',null,array('placeholder'=>'e.g:#www.bing.com/post#')) }}
					</div> 
					{{ Form::submit('Start Crawling', array('class'=>'ui primary button')) }}
				{{ Form::close() }}
				</div>
			</div>
			<div class="ui vertical segment">
			<?php 
if (Request::isMethod('post')) {
    $crawler = new Crawling();
    // URL to crawl
    $crawler->setURL("www.sysfoghost.in");
    // Only receive content of files with content-type "text/html"
    $crawler->addContentTypeReceiveRule("#text/html#");
    // Ignore links to pictures, dont even request pictures
    $crawler->addURLFilterRule("#\\.(jpg|jpeg|gif|png)\$# i");
    // Store and send cookie-data like a browser does
    $crawler->enableCookieHandling(true);
    // Set the traffic-limit to 1 MB (in bytes,
    // for testing we dont want to "suck" the whole site)
    $crawler->setTrafficLimit(1000 * 1024);
    // Thats enough, now here we go
    $crawler->go();
}
?>
			</div>
		</div>