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 am a Full Stack Developer. I have over 18 yrs hands on experience in PHP, Mysql, JavaScript, open source CMS like Joomla, Wordpress etc. During these 18 years, I have worked on thousands of projects and websites but could not spare time for my own blog. However I will try and write more frequently now.

 

 

Author Archive


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  1 Comment
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

1. Title Tag
This is what appears in the blue bar at the top of your browser, it comes from a metatag called "title". As well as being used as a pure factor in SERP, it also boosts rank in other ways. Some
engines use “click-through” rates as a factor. Sites where the title closely matches the content tend to get better click-throughs (searchers see its not a spam site). When words in the title are also used as anchor text in a link to the page, you get more benefit.

2. Anchor Text of Links
The phrasing, terms, order and length of a link's anchor text is one of the largest factors taken into account by the major search engines for ranking. Specific anchor text links help a site to rank better for that particular term/phrase at the search engines. In other words, it’s the actual text that represents the link on a web page.

3. Keyword Use in Document Text
Your keywords must appear in the actual copy of the page. Supposedly search engines pay more attention to the first and last paragraphs. The way to go about this is have your keywords firmly
in your mind as you write your copy. I don’t know about you, but I find this really hard. I prefer a different approach. There is a simple trick here, write your quality content, then use a
keyword density tool to find the keyword density. THEN, take the top words and add them to the meta keywords tag for that page. This is somewhat backwards for some maybe, it optimizes a page for what you actually wrote, rather than trying to write a page optimized for certain words. I find I get much better correlation like this and can then tweak my text afterwards.
Sure, if you want to you can further optimize by having the keywords in header tags and bold etc. As a guide, these might contribute only a few percent to the SERP

4. Accessibility of Document
“Accessibility is anything on the page that impedes a search engine
spider’s ability to crawl a page. There can be a number of
culprits:”

• Avoid Splash Pages: Flash and heavily graphic introductions prohibit engines from crawling your site.
• Avoid Frames: Never use pages with frames. Frames are too complex for the crawlers and too cumbersome to index.
• Avoid Cookies: Never require cookies for Web site access! Search engine crawlers are unable to enter any cookierequired materials.
• Avoid JavaScript when Possible: Though JavaScript menus are very popular, they disable crawlers from accessing those links. Most, well-indexed Web sites incorporate textbased
links primarily because they are search engine friendly. If necessary, JavaScript should be referenced externally.
• Avoid Redirects: Search engines frown upon companies that use numerous Web sites to redirect to a single Website.
• Avoid Internal Dynamic URLs on the Home page: Though many sites incorporate internal dynamic links, they should not incorporate those links on the home page. Engine crawlers are currently ill-equipped to navigate dynamic links – which often pass numerous parameters using
excessive characters.
• Utilize Your Error Pages: Too often companies forget about error pages (such as 404 errors). Error pages should always re-direct "lost" users to valuable, text-based pages.
Placing text links to major site pages is an excellent practice. Visit www.cnet.com/error for an example of a well-utilized error page.

5. Links to Document from Site-Internal Pages
Even more important than the holy grail of external links is internal links. Who knew! Easily the most underrated criteria. But, it’s important to make sure you are making good use of anchor text. A well-linked to document is considered more important than an obscure page, even if the links are coming from the site itself.

6. Primary Subject Matter of Site
What your website is about is determined through analysis of the content. It’s critical that it correlates to keywords, anchor text, etc. One strange off shoot of this is perhaps it’s not worth spending much effort trying to build the page rank of the home page. This strange concept is explained in the idea of Search Engine Theme Pyramids. A related factor is having a good sitemap. Not only is it good spider food, you can also load it with lots of quality anchor text for
those internal links as well as relevancy text (that which appears near a link). Also important is the invisible Google sitemap which is an xml file for the Google spider only.

7. External Links to Linking Pages
These are the links from other sites to you. Note it’s much better to have specific pages linked rather than your homepage because of the idea of Search Engine Theme Pyramids. Don’t bother with link farms or anything you see advertised for a link. You are much better off finding links from sites that have similar topics as yourself.

8. Link Popularity of Site in Topical Community
The search engine is trying to figure out what your page is about, so it can decide if it’s relevant to a users search. Links from pages with similar topics add credence to your page. When trying to search out those links you can use something like WebFerret. Or if you just want a quick method, use the “related:” tag in Google, e.g. type “related:www.yahoo.com” in and it will search for sites related to the topic of Yahoo (whatever that is?). Then spend some time emailing webmasters and asking for links. There is software out there that will do this automatically for you.

9. Global Link Popularity of Site
This means that links from sites that are “important” (i.e. have a high SERP) are more valued than those from a lower SERP. A factor worth considering when searching out links, get the ones from sites with a high page rank first.

10. Keyword Spamming
Careful, this is a negative factor!! This means having a keyword density in text or tags so high that the engine decides you are stuffing. Your rank will go from #1 to #10000 in a heartbeat. Want to know the best part? No-one actually knows what percent density this is, and it’s probably different for different engines!

Post by Himanshu Swaraj

More
Last Updated on Saturday, 19 December 2009 03:13

Search engine optimization (SEO) is the process of improving the volume or quality of traffic to a web site< from search engines via "natural" or un-paid ("organic" or "algorithmic") search results as opposed to search engine marketing (SEM) which deals with paid inclusion. Typically, the earlier (or higher) a site appears in the search results list, the more visitors it will receive from the search engine. SEO may target different kinds of search, including image search,local search, video searchand industry-specific vertical search engines. This gives a web site web presence.

As an Internet marketing strategy, SEO considers how search engines work and what people search for. Optimizing a website primarily involves editing its content and HTML and associated coding to both increase its relevance to specific keywords and to remove barriers to the indexing activities of search engines.

The acronym "SEO" can refer to "search engine optimizers," a term adopted by an industry of consultants who carry out optimization projects on behalf of clients, and by employees who perform SEO services in-house. Search engine optimizers may offer SEO as a stand-alone service or as a part of a broader marketing campaign. Because effective SEO may require changes to the HTML source code of a site, SEO tactics may be incorporated into web site development and design. The term "search engine friendly" may be used to describe web site designs, menus, content management systems, images, videos, shopping carts, and other elements that have been optimized for the purpose of search engine exposure.

Another class of techniques, known as black hat SEO or spamdexing, use methods such as link farms, keyword stuffing and article spinning that degrade both the relevance of search results and the user-experience of search engines. Search engines look for sites that employ these techniques in order to remove them from their indices.

More
Tags: ,   |  Posted under SEO  |  Comments  No Comments
Last Updated on Saturday, 19 December 2009 03:06

CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.

Features

 

  • No Configuration – Set-up the database and let the magic begin
  • Extremely Simple – Just look at the name…It's Cake
  • Active, Friendly Community – Join us #cakephp on IRC. We'd love to help you get started
  • Flexible License – Distributed under the MIT License
  • Clean IP – Every line of code was written by the CakePHP development team
  • Best Practices – covering security, authentication, and session handling, among the many other features
  • OO – Whether you are a seasoned object-oriented programmer or a beginner, you'll feel comfortable     
More
Tags: ,   |  Posted under MVC, PHP  |  Comments  1 Comment
Last Updated on Sunday, 13 December 2009 09:49