PHP Classes

Unique Values from URLs: Get unique of domains from a list of URLs

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 110 All time: 9,651 This week: 140Up
Version License PHP version Categories
unique-values-from-u 1.0Freely Distributable5Networking, PHP 5
Description 

Author

This class can get unique of domains from a list of URLs.

It takes a list of URLs and parse them to extract the host.

The class returns an array with the list of domains contained in the URLs.

Picture of Peace Ngara
Name: Peace Ngara <contact>
Classes: 1 package by
Country: South Africa South Africa

Example

<?php
//Inlcude tghe Parser
include_once "Parser.php";

   
$urls = array(
   
'http://www.google.com',
   
'https://www.google.com',
   
'https://www.google.com/',
   
'https://www.facebook.com',
   
'http://www.facebook.com'
   
);
   
//Instantiate
   
$parse = new Parser();
   
$parse->arrayValuesUrlParser($urls);
   
?>


Details

unique-values-from-urls

Get Unique Values from URL's, a URL Parse that will remove dumplicates from URL's


  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file index.php Example Example script
Plain text file Parser.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:110
This week:0
All time:9,651
This week:140Up