Showing posts with label articles. Show all posts
Showing posts with label articles. Show all posts

Saturday, May 14, 2011

What is an IDE

In short, an IDE provides a one-stop shop for your coding work. An IDE contains an editor in which you can edit the code, debug the code, view your code in a browser (often embedded), and check in and out of source code control. To support that functionality, an IDE has a set of features you don't find in a basic editor, such as Notepad or Vim. Again, you can extend editors to do a lot of these things, but IDEs have all this functionality in one tidy package -- typically preconfigured:

Projects
A key distinguishing feature of an IDE is that it looks at a PHP application as a project, not just a set of files. That containing concept -- the project -- maintains extra information, such as the configuration of the source code control, the database settings for debugging purposes, and the location of certain key directories.

Debugging
Another handy feature is integrated debugging. With this functionality, you can set breakpoints in the editor at which the PHP interpreter stops during execution of the script. From there, you can inspect the values of local variables to diagnose issues in the code. It's a healthy alternative to sprinkling echo statements through your code to check values or using the error log to get the values of variables.

Saturday, April 30, 2011

PHP Simple HTML DOM Parser - an Intoduction

PHP Simple HTML DOM Parser, is one of the easiest DOM manipulation script written in PHP5+. Being Open source, it is free to use under the MIT License. Supporting invalid HTML, this parser is better then other PHP scripts that use complicated regexes to extract information from web pages. It helps to find tags on an HTML page with selectors just like jQuery.

Some of the Usage examples are:

Friday, April 29, 2011

Cleaning and Validating user input with htmLawed

htmLawed is a highly customizable single-file PHP script to make text secure, standard and admin policy-compliant for use in the body of HTML 4, XHTML 1 or 1.1, or generic XML documents. It is thus a configurable input (X)HTML filter, processor, purifier, sanitizer, beautifier, etc., and an alternative to the HTMLTidy application.

The lawing in of input text is needed to ensure that HTML code in the text is standard-compliant, does not introduce security vulnerabilities, and does not break the aesthetics, design or layout of web-pages. htmLawed tries to do this by, for example, making HTML well-formed with balanced and properly nested tags, neutralizing code that may be used for cross-site scripting (XSS) attacks, and allowing only specified HTML elements/tags and attributes

Thursday, April 28, 2011

PHP CLI script and Command line arguments

One of the advantages of  PHP is that, it can be run from the command line like a c program. Sometimes scripts are made to run behind the browser to give faster response to the user, and some time to run the bulky operations. (video conversion, cron, backups).

There are to ways to get the arguments in the script, while running it from command line:

Sunday, April 17, 2011

PHP Tutorial for Beginners - by Webmonkey

Just found a great PHP tutorial for Beginners at Webmonkey. It is indeed a very well written and explained tutorial for the beginners who are completely new to PHP. It covers almost everything Basic syntax, Variables, HTML Forms, Arrays, Loops, Functions and lot more.

Read it here

Enjoy reading it. Thanks.