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.

 

 

Archive for January, 2010

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

 Shorthand for asynchronous JavaScript and XML, is a group of interrelated web development techniques used on the client-side to create interactive web applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page.

The use of Ajax techniques has led to an increase in interactive or dynamic interfaces on web pages. Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of JavaScript and XML is not actually required, nor do the requests need to be asynchronous.

AJAX is based on the following web standards:

  • JavaScript
  • XML
  • HTML
  • CSS

AJAX uses the XMLHttpRequest object

To get or send information from/to a database or a file on the server with traditional JavaScript, you will have to make an HTML form, and a user will have to click the "Submit" button to send/get the information, wait for the server to respond, then a new page will load with the results. Because the server returns a new page each time the user submits input, traditional web applications can run slowly and tend to be less user-friendly.

With AJAX, your JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object.

With the XMLHttpRequest object, a web page can make a request to, and get a response from a web server – without reloading the page. The user will stay on the same page, and he or she will not notice that scripts request pages, or send data to a server in the background.

To demonstrate the AJAX PHP connection we will create a very simple form with 2 input fields. In the first field you can type any text and we will send this text to our PHP script which will convert it to uppercase and sends it back to us

HTML code

<body>
	<form name="testForm">

	Input text: <input type="text" onkeyup="doWork();" 
	name="inputText" id="inputText" />

	Output text: <input type="text" name="outputText" 
	id="outputText" />

	</form>

</body>

1. First step

 // Get the HTTP Object 
 function getHTTPObject(){ 
 
	if (window.ActiveXObject) 

 		return new ActiveXObject("Microsoft.XMLHTTP"); 
  	else if (window.XMLHttpRequest) 
 
		return new XMLHttpRequest(); 
 
	else { 
 
		alert("Your browser does not support AJAX."); 
		return null; 
		} 
	}

2. Second Step

// Implement business logic 
 function doWork(){ 
 	 httpObject = getHTTPObject(); 
	 if (httpObject != null) {  
	 	httpObject.open("GET", "upperCase.php?
		inputText="+document.getElementById
		('inputText').value, true); 
		httpObject.send(null); 
		httpObject.onreadystatechange = setOutput; 
		} 
	 }

3. The last step on client side is to implement the setOutput() function which will change the value of our second field.

  • 0 = uninitialized
  • 1 = loading
  • 2 = loaded
  • 3 = interactive
  • 4 = complete
// Change the value of the outputText field 
 function setOutput(){ 
 	 if(httpObject.readyState == 4){ 
	 	document.getElementById('outputText').value 
		= httpObject.responseText; 
		} 
	 } 

 

Implementing the server side functionality is very simple compared to the client side. In the PHP code we just need to check the $_GET super-global array. Afterwards convert it to uppercase and echo the result. So the PHP code is this:

<?php if (isset($_GET['inputText']))
      	echo strtoupper($_GET['inputText']);
      ?>
More
Tags: , ,   |  Posted under Ajax, PHP, Technology  |  Comments  No Comments
Last Updated on Saturday, 15 May 2010 11:54