Google Ads

Proudly Hosted on

About Me

Hi, I 'm Aditya, the guy behind this website and many other. This site acts as my web playground, where I share all about me, my work and my knowledge.

I have over 10.5 yrs hands on experience in PHP, Mysql, JavaScript, open sources CMS like Joomla, Wordpress etc. During these 10.5 years, I have worked on more than 200 projects and/or websites but could not spare time for my blog. But now I am trying to write something whenever I can.

 

 

Posts Tagged ‘PHP’


Today i want to share a very simple and easy to use Paypal class. If you are a web developer you must have integrated Paypal on your websites. With the help of this class you can handle paypal payment as well as instant payment notification. Frankly speaking i have not created the class but have used it so many times with great success. Thanks to the original developer.

It includes two php files, one is the class and other one is the implementation.

More
Tags: , , ,   |  Posted under Payment Gateway, PHP  |  Comments  No Comments
Last Updated on Sunday, 4 July 2010 05:34

Autocomplete/ Autosuggest is a feature provided by many web browsers, e-mail programs, search engine interfaces, source code editors, database query tools, word processors, and command line interpreters. Autocomplete involves the program predicting a word or phrase that the user wants to type in without the user actually typing it in completely.

Here i am going to demonstrate a simple example of autosuggest. Thi is based on php and ajax. It will fetch country names based on the keyword entered in textbox from the database. We will create three files for this:-

1. First Step :- Make a HTML file containing the textbox

More
Tags: , , ,   |  Posted under Ajax  |  Comments  No Comments
Last Updated on Sunday, 16 May 2010 09:34

Joomla! plugins enable you to execute code in response to certain events, either Joomla! core events or custom events that are triggered from your own code. This is a powerful way of extending the basic Joomla! functionality.

Basically there are the following types of plugins:

  • authentication
  • content
  • editors
  • editors-xtd
  • search
  • system
  • user
  • xmlrpc
More
Tags: , ,   |  Posted under Joomla  |  Comments  No Comments
Last Updated on Saturday, 15 May 2010 11:29
XML

About XML

Extensible Markup Language (XML) is described as both a markup language and a text based data storage format, depending on who you talk to. It is a subset of Standard Generalized Markup Language (SGML); it offers a text-based means to apply and describe a tree-based structure to information. XML serves as the basis for a number of languages/formats, such as Really Simple Syndication (RSS), Mozilla's XML User Interface Language (XUL), Macromedia's Maximum eXperience Markup Language (MXML), Microsoft's eXtensible Application Markup Language (XAML), and the open source Java XML UI Markup Language (XAMJ). As the many flavors of XML demonstrate, XML is a big deal. Everyone wants to get on the XML bandwagon.

Writing XML

XML's basic unit of data is the element. Elements are delimited by a start tag, such as , and an end tag, such as . If you have a start tag, you must have an end tag. If you fail to include an end tag for each start tag, your XML document is not well-formed, and parsers will not parse the document properly. Tags are usually named to reflect the type of content contained in the element. You would expect an element named book to contain a book title, such as Great American Novel (see Listing 1). The content between the tags, including the white spaces, is referred to as character data.

Listing 1. A sample XML document

 

<books>   
       
       <book>     
        <title>Great American Novel</title>       
		<characters>       
			<character>       <name>Cliff</name>       <desc>really great guy</desc>      </character>      <character>       <name>Lovely Woman</name>       <desc>matchless beauty</desc>      </character>      <character>       <name>Loyal Dog</name>       <desc>sleepy</desc>      </character>     </characters>     <plot>      Cliff meets Lovely Woman.  Loyal Dog sleeps, but wakes up to bark      at mailman.     </plot>     <success type="bestseller">4</success>     <success type="bookclubs">9</success>     </book>    </books> 

XML element and attribute names can consist of the upper case alphabet A-Z, the lower case alphabet a-z, digits 0-9, certain special and non-English characters, and three punctuation marks, the hyphen, the underscore, and the period. Other punctuation marks are not allowed in names.

XML is case sensitive. In this example, and describe two different elements. Either is an acceptable element name. It's probably not a good idea to use and to describe two different elements, as the possibility of clerical error seems high.

Each XML document contains one and only one root element. The root element is the only element in an XML document that does not have a parent. In the example above, the root element is . Most XML documents contain parent and child elements. The element has one child, . The element has four children, , , and . The element has three child elements, each of which is a element. Each element has two child elements, and .

In addition to the nesting of elements that create the parent-child relationships, XML elements can also have attributes. Attributes are name-value pairs attached to an element's start tag. Names are separated from values by an equal sign, =. Values are enclosed by single or double quotation marks. In Listing 1 above, the element possesses two attributes, "bestseller" and "bookclubs". There are different schools of thought among XML developers about the use of attributes. Most information contained in an attribute could be contained in a child element. Some developers insist that attribute information should be metadata, namely information about the data, and not the data itself. The data itself should be contained in elements. The choice of whether to use attributes or not really depends on the nature of the data and how data will be extracted from the XML.

Strengths of XML

One of XML's good qualities is its relative simplicity. You can write XML with basic text editors and word processors, no special tools or software required. The basic syntax for XML consists of nested elements, some of which have attributes and content. An element usually consists of two tags, a start tag and an end tag, each of which is bracketed by an open and a close < /tag >. XML is case sensitive and does not ignore white space. It looks a lot like HTML, which is familiar to a lot of people, but, unlike HTML, it allows you to name your tags to best describe your data. Some of XML's advantages are its self-documenting, human, and machine-readable format, its support for Unicode, which allows for internationalization in human language support, and its stringent syntax and parsing requirements. Unfortunately, UTF-8 is problematic in PHP5; this shortcoming is one of the forces driving the development of PHP6.

Weaknesses of XML

XML is wordy and redundant, with the attendant consequences of being large to store and a huge consumer of bandwidth. People are supposed to be able to read it, but it's hard to imagine a human trying to read an XML file with 7 million nodes. The most basic parser functionality doesn't support a wide array of data types; therefore, irregular or unusual data, which is common, is a primary source of difficulty.

Well-Formed XML An XML document is well-formed if it follows all of XML's syntax rules. If a document is not well-formed, it is not XML, in a technical sense. An HTML tag such as
is unacceptable in XML; the tag should be written
to be well-formed XML. A parser won't parse XML properly if it is not well-formed. Additionally, an XML document must have one and only one root element. Think of the one root element as being like an endless file cabinet. You have one file cabinet, but there are few limits as to what and how much you can fit into the file cabinet. There are endless drawers and folders into which you can stuff information.

More
Tags: ,   |  Posted under XML  |  Comments  No Comments
Last Updated on Sunday, 7 February 2010 05:15

PHP is one of the most widely used open-source server-side scripting languages that exist today. With over 20 million indexed domains using PHP, including major websites like Facebook, Digg and WordPress, there are good reasons why many Web developers prefer it to other server-side scripting languages, such as Python and Ruby.

Some of the most powerful PHP classes and libraries are as follows:

 

Databases

  • ADOdb
    Object-oriented library. Made by pobraztsu Microsoft ADO, but has several enhancements that make it unique (for example, summary tables, caching records …) Supports many databases including: MySQL, PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, FoxPro , Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP.
  • Doctrine
    Represents an object-relational mapping (ORM) in PHP 5.2.3 +. A key feature of this library is that it allows you to write database queries in object-oriented form, with its own dialect of SQL – Doctrine Query Language (DQL). This is a powerful alternative to conventional SQL-queries.
  • PHPLINQ
    A set of PHP-Classes for database management.

Working with documents

Allows you to create ZIP-archives (WinZip, PKZIP). PclZip determines the object class

  • TCPDF
    Class that generates PDF documents. Does not require other libraries, supported formats ISO, including UTF-8, Unicode, RTL, and HTML.
  • PHPPowerPoint
    Open standards-based Microsoft OpenXML. Allows you to read and write documents PowerPoint. Gives the ability to manage meta-data (author, title, description, …), add the slides and images in presentations and much more.
  • PHPExcel
    Also works on Microsoft OpenXML. Allows you to read and save files in Excel. Features include: editing meta data (author, title, description, …), managing spreadsheets, fonts, styles, add images, and much more.
  • PhpRtf Lite
    Allows you to create and edit compatible with MS Word and Open Office Writer, RTF with PHP. Allows you to control almost everything. Compatible with UTF-8.
  • PclZip

Email

  • Swift Mailer
    Swift Mailer is easily integrated into any PHP-application. It is a flexible and elegant OOP approach to sending messages with multiple functions: sending email using SMTP, SendMail, Postfix, support for servers, etc.
  • PHPMailer
    Best class for working with e-mail. mail. Supports message in digital form, S / MIME encryption, text and HTML-mail, images, supports several Email'ov, SMTP-authentication.

Forms

  • Securimage PHP Captcha
    Script for creating complex images (captures) for protection against spammers. Easily added to any shape.
  • phpObjectForms
    OOP library for creating and processing HTML-forms. Key Features: Supports all standard forms of input, checking on the server side using regular expressions, checking on the client side using Javascript, supports a form template. Styles forms are written in CSS and you can easily customize their display.

Images / media / files

Asido offers the following functions: image resizing, applying watermarks to images, rotate, copy, image cropping, conversion to grayscale, and more.

  • Asido
  • PHP Thumb
    A small library for working with images: resizing, rotation, Crop. You can also add custom features. It can perform multiple actions in succession, without neodhodimosti save and re-initialize the class with all the manipulations.
  • WideImage
    OOP library for working with images. It provides a simple way of loading and storing images from files, databases, and URL. Supports most popular image formats: GIF, PNG, JPEG, GD and GD2.
  • Smart Image Resizer
    Allows you to resize and kropat any images on your site actually they are not touching. Simply upload the image to its maximum size and then use any part of it. It has many useful functions.
  • class.upload.php
    It's a little PHP-script to download images and management on the server. It can convert images from one format to another, resize, add labels, watermarks, and "wash out" the image. You can use it for files that are downloaded with the aid of HTML-forms, Flash Uploader or local files.
  • getID3 ()
    PHP-script that extracts useful information from MP3 and other multimedia formats (OGG, WMA, WMV, ASF, WAV, AVI, AAC, VQF, FLAC, MusePack, Real, QuickTime, Monkey's Audio, MIDI, etc.)

Javascript / AJAX

  • PHPLiveX
    A small library that allows you to easily integrate AJAX technology into your web project. You can send the form data and send the request to another page without reloading the current one.
  • Xajax
    Very famous library and Javascript-engine that allows you to easily create powerful Ajax-applications using HTML, CSS, Javascript, PHP. Pages have the opportunity to send asynchronous requests to the server and update page content without it rebooting.

RSS / Atom

  • SimplePie
    PHP-class, which provides a simple API to perform all the dirty work of receiving, caching, parsing, and normalization of the structure of RSS and Atom formats.

Safety

Testing and debugging

Webservices

More
Tags: ,   |  Posted under PHP  |  Comments  No Comments
Last Updated on Saturday, 16 January 2010 05:01