PHP Classes

urlmatch: Matches any URLs in a string of text

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2002-11-23 (13 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,186 All time: 3,041 This week: 1,438Up
Version License Categories  
urlmatch 1.0GNU General Publi...Text processing
Description Author  

Looks for any URLs in a string of text and matches each one with a customizable <a> tag. Convenient for parsing user input where users are not expected to write HTML. The class finds URLs starting with 'http|https|ftp|www', ignores HTML tags, supports the addition of <a> properties (such as defining a CSS class), and supports a character limit for the displayed link text. I have tested it with many possibilities and it has been revised to support many URL-in-text scenarios but please don't hesitate to report any bugs to my above email address. To-Do: matching email addresses, if the need arises. Currently requires PHP >= 4.1.0 (uses array_key_exists() and foreach() )

Picture of kumar mcmillan
Name: kumar mcmillan <contact>
Classes: 7 packages by
Country: United States United States
Age: 36
All time rank: 15016 in United States United States
Week rank: 198 Down26 in United States United States Down

  Files folder image Files  
File Role Description
Plain text file class.urlmatch.php Class class source
Accessible without login Plain text file _test.urlmatch.php Test test script

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,186All time:3,041
 This week:0This week:1,438Up
 User Comments (1)