/    Sign up×
Community /Pin to ProfileBookmark

HTML Tidy without HTML Tidy?

Hey PHP[I]ers[/I]!

I just have a quick question. Does anyone know of a PHP script/class/etc that will allow me to have some of the functions of [URL=”http://tidy.sourceforge.net/”]HTML Tidy[/URL] without actually needing [URL=”http://www.php.net/manual/en/ref.tidy.php”]the built-in HTML Tidy library of PHP[/URL]? I need it to not be reliant on the HTML Tidy library of PHP because my current web hosting provider does not support HTML Tidy and I have talked with them and they have no intentions of supporting it in the near future. I’m mostly interested in the output formatting features of HTML Tidy. Like proper source code indention and such.

I have been searching high and low but have so far not been able to find anything…

Any help on this matter would be [B]greatly[/B] appreciated. ?

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@NogDogDec 18.2007 — I'm not aware of any PHP alternatives. If the Tidy C executable is on your host, you might be able to interface with it via shell_exec() or exec(). Otherwise, good hunting. ?
Copy linkTweet thisAlerts:
@JickauthorDec 18.2007 — Well, that is an idea I hadn't thought of... I'm going to try that. Thanks for that. ?

I'll post again if it works out. ?
Copy linkTweet thisAlerts:
@JickauthorDec 19.2007 — Ok, forgive my stupidity but, what is the Tidy C executable? Is it something I can just download and upload to my web space? If so, where do I download it from? I'm confused... :p
Copy linkTweet thisAlerts:
@NogDogDec 19.2007 — http://tidy.sourceforge.net/

If there is an appropriate executable for your host's platform, you could upload it. Otherwise, you would need to upload the source code and compile it (probably not allowed on a shared host).
Copy linkTweet thisAlerts:
@JickauthorDec 19.2007 — Alright, I downloaded this one. I think that's right. My host runs Linux. But, I extracted the files called "tidy" and "tab2space" but they are extension-less. Like, they have nothing like ".exe" or anything like that. Is that how it's supposed to be? Do I upload it to my space just like that? Or maybe I need to add an extension to them? But what extension would I add? What do you think? Thanks for your help. ?
Copy linkTweet thisAlerts:
@NogDogDec 20.2007 — UNIX and Linux do not care at all what file suffixes you use; all that matters is whether or not you have execute permission on the file. Therefore you probably will want "755" permission set on the file: read/write/execute for you, read/execute for everyone else (including the Apache user).
×

Success!

Help @Jick spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...