PHP Classes

File: documentation.txt

Recommend this page to a friend!
  Classes of Rizwan Abbas  >  PHP OLX Classifieds Scraper  >  documentation.txt  >  Download  
File: documentation.txt
Role: Documentation
Content type: text/plain
Description: Documentation file
Class: PHP OLX Classifieds Scraper
Extract data of classifieds published in OLX sites
Author: By
Last change:
Date: 4 years ago
Size: 1,820 bytes


Class file image Download
This class has two functions 
	gets one parameter any listing url and returns the all classifieds urls.
	This function will get the details of the given url

Usage Example:

$scraper	=	new OLXscraper;

//for single item
//$url = '';

//$ret		=	$scraper->scrap_OLX($url);

$searchURL	=	"";

$list		=	$scraper->classifiedslist($searchURL);

//loop through each url to get details
foreach($list as $url)
	//get classified details
	$ret		=	$scraper->scrap_OLX($url);
	foreach($ret as $k=>$v)
		echo '<strong>'.$k.' </strong>'.$v.'<br>';

This document is taken from the
If you want to extend the class functionality you can check the references here.

Description, Requirement & Features
	A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! 
	Require PHP 5+.
	Supports invalid HTML.
	Find tags on an HTML page with selectors just like jQuery.
	Extract contents from HTML in a single line.
Download & Documents 
	Download latest version form Sourceforge.
	Read Online Document.
Quick Start
	How to get HTML elements?
	How to modify HTML elements?
	Extract contents from HTML
	Scraping Slashdot!
// Create DOM from URL or file
$html = file_get_html('');

// Find all images 
foreach($html->find('img') as $element) 
       echo $element->src . '<br>';

// Find all links 
foreach($html->find('a') as $element) 
       echo $element->href . '<br>';