473,785 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3011
On Mon, 18 Dec 2006 17:39:27 GMT, "AirYT" <ai***@funkychi ckens.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.u k :: 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.c om...
On Mon, 18 Dec 2006 17:39:27 GMT, "AirYT" <ai***@funkychi ckens.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.u k :: 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***@funkychi ckens.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_Rende rer 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.u k :: 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
2518
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 something. The diff file contains diff's for a nuch of files, not just a single file. Do I need a
0
3316
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. It has a timedelta object that returns the difference in days between two dates: >>> d1 = datetime.date(2002,1,1)
3
4223
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 function that is intended for unified_diff. Does anyone know how to "restore" from a unified diff generated delta? Thanks for all your help in advance. Best Regards, Nick
9
6520
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 delta binary is pretty huge in size. I have 1 byte file and 2 bytes file, the delta should be 1 byte but somehow it turns out to be 249 bytes using binary formatter. I guess serialization has some other things added to the delta file.
6
6456
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 add missing/remove old tables/sequences/etc to one or another (manually). Is there some quick tool for doing this ? There was a thread about it sometime in aug, 2002, but it ended without producing anything useful.
4
4957
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 the ordered or unordered xml node tree of the compared documents? - what identifiers/criteria should be used by default to match elements of the same type in different documents? - should a diff tool consider move operations or only insert/delete
4
1783
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 now), we were hoping to do a diff - a textual comparison of the files, ignoring whitespace. However, most diffs we've tried can't handle multi-line whitespace, so
6
3317
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 in red and deletions in red strike though. There seem to be several in Perl and Python and many diff programs which all seem to be line based and work on text written in PHP.
2
1951
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
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.