Diberikan

PHP Java Web Scraper and Crawler

Hi,

Can you make PHP Java web scraper/crawler for any website by putting a code into PHP file?

Normally, I put a simple htmldom to my PHP file as following:

<?php

function getDetail($ASIN){

$returndata="";

$contents=curlContent($ASIN);

$html = new simple_html_dom();

$pageURL="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

if(!empty($contents))

{

$html->load($contents);

if($html->find('div[class="product-details-and-care"] ul')){

foreach($html->find('div[class="product-details-and-care"] ul') as $detail){

$returndata=$detail->plaintext;

$regex = '#<img([^>]*) src="([^"/]*/?[^".]*\.[^"]*)"([^>]*)>((?!</a>))#';

$regex = '#<a([^>]*) href="([^"/]*/?[^".]*\.[^"]*)"([^>]*)>((?!</a>))#';

$returndata = preg_replace($regex,'',$returndata);

}

}

else {echo "There is currently no description for this product. We do not represent or warrant that product descriptions or other Content on this Site is accurate, complete, reliable, current, or error-free.";}

$html->clear();

unset($html);

}

return $returndata;

}

echo getDetail($ASIN);

?>

$ASIN is a page url variable of any web page and this case I using with any product page of [url removed, login to view] such as [url removed, login to view]

A function will find element UL under div class of product-details-and-care and will print data as plaintext when visiting a page and connect with $ASIN, if not found or can't access page will print custom text as 'There is currently no description...'

However, I got a problem when currently this code seems to be old-fashioned or get restricted to access and print data on my webpage.

So, I want to know can you make or develop a code with other language in java or etc to working with my PHP file to let all websites allow me to crawl and scrape their content to displayed on my webpage?

Thank

Keahlian Perakitan, Pemrograman C, Java, Python, Web Scraping

Lihat lebih lanjut: freelance web crawler scraper, java screen scraper web page, using drag drop java php mysql, help using sabre web services php, php crawler scraper, sample web scraper source code php, screen scraper web crawler, web crawler supports javascript java, free website crawler web search php language, web file management document email coldfusion java php, web scraper perl java, php upload script using java, selection web technologies php net java

ID Proyek: #12704292

1 freelancer menawar pada rata-rata $40 untuk pekerjaan ini

cungthehung

Hired by the Employer

$40 USD dalam 3 hari
(24 Ulasan)
4.2