PHP Classes

PHP Scrape Website Links: Parse and extract links and images from Web pages

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 1,224 All time: 3,115 This week: 114Up
Version License PHP version Categories
website-parser 1.0.1The PHP License5.0HTML, PHP 5, Web services
Description 

Author

This class can parse and extract links and images from Web pages.

It can send a HTTP request to the server of a given URL and retrieves a page to be parsed.

The class searches the retrieved page to extract the URLs of links and images.

Picture of Morshed Alam
  Performance   Level  
Name: Morshed Alam <contact>
Classes: 2 packages by
Country: Bangladesh Bangladesh
Age: 43
All time rank: 175124 in Bangladesh Bangladesh
Week rank: 312 Up6 in Bangladesh Bangladesh Up

Details

About

A Website parser class to extract links and images from Web pages. View Demo or Try it out and Rate on phpclasses.org

Uses

<pre><code>include 'website_parser.php';

//Instance of WebsiteParser $parser = new WebsiteParser('http://morshed-alam.com/');

//Get all hyper links $links = $parser->getHrefLinks();

//Get all image sources $images = $parser->getImageSources();

//Get all meta tags and Facebook open graph properties $meta_tags = $parser->getMetaTags();</code></pre>

Contributing

  1. Fork it
  2. Create your feature branch (`git checkout -b my-new-feature`)
  3. Commit your changes (`git commit -am 'Added some feature'`)
  4. Push to the branch (`git push origin my-new-feature`)
  5. Create new Pull Request

Screenshots  
  • screenshot.png
  Files folder image Files  
File Role Description
Files folder imageviews (4 files)
Accessible without login Plain text file cookie.txt Data Cookie
Accessible without login Plain text file example.php Example Example to extract website urls
Accessible without login Plain text file index.php Example Example of Uses
Accessible without login Plain text file README.md Data modify readme
Plain text file website_parser.php Class Parser class

  Files folder image Files  /  views  
File Role Description
  Accessible without login Plain text file href.html.php Aux. To render To render hyper links
  Accessible without login Plain text file image.html.php Aux. To render images
  Accessible without login HTML file meta.html.php Example Example script
  Accessible without login HTML file title.html.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:1,224
This week:0
All time:3,115
This week:114Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1487
 
in truncateText() method I would use http://www.
10 years ago (Rad Paluszak)
70%StarStarStarStar