Batch code indenters and beautifiers [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Does anyone here know of good batch file code indenters or beautifiers?
Specifically for PHP, JS and SGML-languages.
Preferably with options as to style.

The following page has code on it to tidy Javascript (written in javascript as well):
http://www.howtocreate.co.uk/tutorials/jsexamples/JSTidy.html
There are various ways to tidy SGML based files (i.e. XML) - HTMLTidy will often do the trick, and there are various 'pretty print' implementations in various languages out there.
And finally a link to a web site with PHP code for pretty printing PHP: http://tobyinkster.co.uk/blog/2007/07/17/php-pretty-printer/

For HTML/XML HTML Tidy is the best option:
http://tidy.sourceforge.net/

Related

PHP duplicate content detection system [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Are there any popular PHP libraries or services that can help detect duplicate content?
I run a site that has user generated content and I want to detect content that are similar or duplicated. Are there any popular libraries out there that can help with this?
Text similarity/plagiat/duplicate is a big topic. There are so many algos and solutions.
Some projects use the "adaptive local alignment of keywords" (you will find info on that on google.)
Also, you can check this (Check the 3 links in the answer, very instructive):
Cosine similarity vs Hamming distance
Hope this will help.

Link crawler (for download or development) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a question regarding webcrawling..
What I need is a webcrawler that can save all external links from a website and print them to a file (csv).
I am in the middle of developing it myself (with php), but was wondering if there were some downloadable solutions already (doesn't have to be php solution)..
Of course I have looked for myself, but couldn't find anything. So if anyone can help me out here, I would really appreciate it.
Also, what would be the best way to developing it be?
You can Simple HTML Dom Parser (http://simplehtmldom.sourceforge.net/)
Eg.
<?php
include 'simple_html_dom.php';
$html = file_get_html('http://google.com/');
foreach($html->find('a') as $element) {
$link[]=$element->href;
}
//Write into your CSV file
?>

Colorize code inside <code></code> [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a open source PHP script to colorize the code inside
<code></code>
or
[code][/code] tags.
Thanks
You could also try a clientside/javascript highlighter: Google Code Prettify
Supports all C-like, Bash-like, and
XML-like languages.
(This is the one used on stackoverflow.com/ and code.google.com/)
Assuming you want something other than the built-in syntax highlighter, GeSHi looks like it might fit your requirements:
GeSHi started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalised to this project. GeSHi aims to be a simple but powerful highlighting class, with the following goals:
Support for a wide range of popular languages
Easy to add a new language for highlighting
Highly customisable output formats
PHP has some built in functions for this purpose. Check if highlight_string or highlight_file will work for you
http://www.php.net/highlight_file
http://www.php.net/highlight_string

Microsoft Word to HTML in PHP script [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I want to know the PHP code for Word to HTML conversion. When we retrive the Word document from the database and display in the frontend, the Word document should display as HTML page.
wvware
I don't completly understand your request but I think you can try TinyMCE for PHP, it's a Web based Wysiwyg editor, where all you type and format will be saved as HTML code, you can even paste and convert Word documents.
So like symcbean said, the best way to do is wvWare, otherwise,you could hardcode a class yourself, but it will be a difficult path.

Learning JSON in relation to php [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Anyone knows where i can get good introduction info on json in relation to php
You can check the PHP manual for JSON functions: json_encode and json_decode
You can also take a look at json.org for the JSON spec.
In brief, JSON is a data format that can be read natively by Javascript, which makes it very fast and convenient for doing AJAX requests or generally passing information from server-side scripts to Javascript.
there's not much to be introduced to. try var_dump(json_encode($x)); and var_dump(json_decode(json_encode($x))); for different values (and types) of $x, and you know basically everything there is to it.

Categories