Text file comparison - algorithm

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ngungo
Forum Commoner
Posts: 75
Joined: Thu Jun 08, 2006 10:45 pm

Text file comparison - algorithm

Post by ngungo »

I am looking for a way to determine if a text file b is an edited version of a text file a.
If there is not a function already, here are some thoughts:
1. Two files have almost same length (within 2% deviation or some small arbitrary number)
2. Two files contain some rare words.

Any suggestion would be appreciated.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Diff.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

Post Reply