-1

how can i get 2 pages, and output the difference between those. getting the pages not a problem, but stuck on how to get the difference....i need a library for ruby OR php

thank you.

3 Answers3

3

http://us3.php.net/manual/en/function.xdiff-string-diff.php

JasonWoof
  • 4,176
  • 1
  • 19
  • 28
  • 2
    you might want to tidy them first, if they aren't formatted the same, or have a lot of stuff on one line: http://us3.php.net/manual/en/book.tidy.php – JasonWoof Sep 10 '09 at 01:28
0

Not exactly what you asked for, but you might find it interesting and/or useful, but there is a Javascript diff library which might work for your needs.

Mike Buckbee
  • 6,793
  • 2
  • 33
  • 36
0

For PHP, I'd suggest looking at the daisydiff project. This work was done to create a visual diff for Mediawiki.

Otherwise, the easiest thing to do would be to shell out to the diff program, and transform the results into html.

brianegge
  • 29,240
  • 13
  • 74
  • 99