473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

php diff

Hello,

I'm looking for an implementation for diffing 2 (text) files and spitting
out the output using php only. i would like to extend this to use ftp to
diff two files on two ftp servers, or one local file & a remote ftp server.

Anyone have any ideas on source for this before i go ahead and build it? At
least the diff engine? a nice gui would be best, but not totally necessary.

TIA,
yt

Dec 18 '06 #1
3 2989
On Mon, 18 Dec 2006 17:39:27 GMT, "AirYT" <ai***@funkychickens.orgwrote:
>I'm looking for an implementation for diffing 2 (text) files and spitting
out the output using php only. i would like to extend this to use ftp to
diff two files on two ftp servers, or one local file & a remote ftp server.

Anyone have any ideas on source for this before i go ahead and build it? At
least the diff engine? a nice gui would be best, but not totally necessary.
For the diff engine part:

http://pear.php.net/package/Text_Diff
(I've been using this for a while and it's fine)

http://pecl.php.net/package/xdiff
(Not pure PHP, it's a compiled extension)

Or shell out to an external diff command.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Dec 18 '06 #2
"Andy Hassall" <an**@andyh.co.ukwrote in message
news:sk********************************@4ax.com...
On Mon, 18 Dec 2006 17:39:27 GMT, "AirYT" <ai***@funkychickens.orgwrote:
>>I'm looking for an implementation for diffing 2 (text) files and spitting
out the output using php only. i would like to extend this to use ftp to
diff two files on two ftp servers, or one local file & a remote ftp
server.

Anyone have any ideas on source for this before i go ahead and build it?
At
least the diff engine? a nice gui would be best, but not totally
necessary.

For the diff engine part:

http://pear.php.net/package/Text_Diff
(I've been using this for a while and it's fine)

http://pecl.php.net/package/xdiff
(Not pure PHP, it's a compiled extension)

Or shell out to an external diff command.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

thanks - ever seen a good GUI diff done in php?

regards, yt
Dec 18 '06 #3
On Mon, 18 Dec 2006 19:04:23 GMT, "AirYT" <ai***@funkychickens.orgwrote:
>http://pear.php.net/package/Text_Diff
(I've been using this for a while and it's fine)

thanks - ever seen a good GUI diff done in php?
I wrote one using Text_Diff at work (which means I can't post the code) - it's
not that hard, you just make your own subclass of the Text_Diff_Renderer class
from Text_Diff, if I remember correctly. I think there's also a couple of
example renderers in the package that you can tweak.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Dec 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Charley | last post by:
I've got a diff file that I think is a patch for a bunch of file in a directory. How do I apply this file? I thought it was #patch myfile.diff But that does nothing. I must be missing...
0
by: python | last post by:
Hi- I have a lot of monthly time series data. I need to be able to compare two dates and get the number of months that they are apart. The datetime module is a daily-frequency data type. ...
3
by: Nick Allen | last post by:
After using ndiff from difflib, the function restore would return the sequence that generated the delta. Unfortunately, restore does not do the same for unified_diff. I do not see any similar...
9
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the...
6
by: Igor Shevchenko | last post by:
Hi! Suppose I have "pg_dump -s" of two pg installs, one is "dev", another is "production". Their schemas don't differ too much, and I want to get a "diff -u"-like schema diff so I can quickly...
4
by: Andreas Kasparek | last post by:
Hola! I'm preparing my master thesis about a XML Merge Tool implementation and was wondering if there is any open standard for XML diff regarding topics like: - is a diff result computed on...
4
by: Shug | last post by:
Hi, We're reformatting a lot of our project code using the excellent uncrustify beautifier. However, to gain confidence that it really is only changing whitespace (forget { } issues for just...
6
by: Aaron Gray | last post by:
Hi, I am working on an HTML WYSISYG Wiki and need to display a diff page like WikiPedia does if two people edit a file at the same time to give the second user the diff. Basically with additions...
2
by: akshaycjoshi | last post by:
I have got one tree tree view control.I have three levels in it. Example- Root1 ------->child1 ------->child2 ---------------->child1 ---------------->child2 ------->child3 Root2
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.