Login   Register  
PHP Classes
elePHPant
Icontem

PHP URL Compare: Compare two URLs and show the differences

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2013-10-25 (10 months ago) RSS 2.0 feedNot enough user ratingsTotal: 334 All time: 6,319 This week: 1,508Up
Version License PHP version Categories  
url-compare 1.0BSD License5.3PHP 5, Text processing
Description Author  

This class can compare two URLs and show the differences.

It can parse two given URLs and compare them to see if they are different.

The class ignores the order of query parameters so it can determine if the URLs are the same even if the order of the parameters is different.

It returns a string with the details of which parts of the URLs may be different.

Innovation Award  
PHP Programming Innovation award nominee
October 2013
Number 5


Prize: One copy of the Zend Studio
Sometimes it is necessary to compare two URLs to determine if they represent the same page.

Comparing the URLs character by character may not be enough to determine if the URLs are different because they may represent the same URL with query parameters order switched.

This class can address that situation by parsing the URLs and comparing the query parameters one by one regardless of their order in the URLs.

Manuel Lemos
Picture of Yasir Siddiqui
Name: Yasir Siddiqui is available for providing paid consulting. Contact Yasir Siddiqui .
Classes: 13 packages by
Country: Pakistan Pakistan
Age: 30
All time rank: 5636 in Pakistan Pakistan
Week rank: 24 Up1 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation
Plain text file UrlDiffer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%Total:334All time:6,319
 This week:0This week:1,508Up