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
Not enough user ratingsTotal: 1,222 All time: 3,117 This week: 116Up
Version License PHP version Categories
website-parser 1.0.1The PHP License5.0HTML, PHP 5, Web services


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: 42
All time rank: 174924 in Bangladesh Bangladesh
Week rank: 114 Up4 in Bangladesh Bangladesh Up



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


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

//Instance of WebsiteParser $parser = new WebsiteParser('');

//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>


  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
  • 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 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  
This week:0
All time:3,117
This week:116Up
User Comments (1)
in truncateText() method I would use http://www.
10 years ago (Rad Paluszak)