Archive

Archive for the ‘ajax’ Category

PHP – HTML5

August 18, 2016 Leave a comment

 

PHP

Starting with PHP 5, the object model was rewritten to allow for better performance and more features. This was a major change from PHP 4. PHP 5 has a full object model.

features in PHP 5 are the inclusions of visibility, abstract and final classes and methods, additional magic methods, interfaces, cloning and typehinting.

PHP treats objects in the same way as references or handles, meaning that each variable contains an object reference rather than a copy of the entire object. See Objects and References

Features

Visibility : The visibility of a property or method can be defined by prefixing the declaration with the keywords public, protected or private.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HTML

How do you improve the performance of a website.

  1. code unification :Each CSS file must be loaded before the page can be displayed in an internet browser.
  2. compress css and javascript files:We can compress a CSS file by removing unnecessary spaces, comments,
  3. Using sprite images instead of multiple images
  4. Always put javascripts at the bottom of the page.

What is bootstrap ?

Bootstrap is CSS framework for developing responsive, mobile first projects on the web. Current version of bootstrap is v3.3.6.  Bootstrap also comes with two preprocessors: less and saas.

 

Bootstrap uses 12 column grid system. Bootstrap’s grid system is responsive, and the columns will re-arrange depending on the screen size

 

What new features has been added in bootstrap 3?

  1. New Glyphicons icon font!
  2. Smallest file size.
  3. New grid system.
  4. its uses CSS compressors (Less/Saas)

Difference between container and container-fluid in bootstrap?

.container has a max width pixel value, whereas .container-fluid is max-width 100%.

.container-fluid continuously resizes as you change the width of your window/browser by any amount.

.container resizes in chunks at several certain widths, controlled by media queries (technically we can say it’s “fixed width”

because pixels values are specified, but if you stop there, people may get the

impression that it can’t change size – i.e. not responsive.)

 

Tell me latest jquery version ?

Latest version of jquery is  V-3.1.0 (11-8-2016)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Difference between html5 tag and normal tag ?

HTML5 tag are called as semantic tags.

A semantic element clearly describes its meaning to both the browser and the developer.

<article>

<aside>

<details>

<figcaption>

<figure>

<footer>

<header>

<main>

<mark>

<nav>

<section>

<summary>

<time>

 

Difference between live and bind function in jquery.

 

The bind() method attaches one or more event handlers for selected elements, and specifies a function to run when the event occurs.

 

The live() method was deprecated in jQuery version 1.7, and removed in version 1.9. Use the on() method instead.

 

Some new fautures of css3?

 

  1. border-radius (border-radius: 25px;)
  2. box-shadow (box-shadow:3px 3px 3px 2px #797979;)
  3. Text Shadow ( text-shadow: #aaa 2px 2px 2px;)
  4. Multiple Backgrounds

.container {

/* fallback */

background: url(image/bg1.png) no-repeat;

 

/* modern browsers */

background: url(image/bg1.png) 0 0 no-repeat,

url(image/bg2.png) 100% 0 no-repeat;

}

 

 

 

 

 

 

 

 

 

  1. Transition

We can add animation to an element using transition. We need to specify these parameters.

  1. transition-property
  2. transition-duration
  3. transition-timing-function
  4. transition-delay

 

div {

width: 150px;

height: 150px;

background: red;

/* For Safari 3.1 to 6.0 */

-webkit-transition-property: height;

-webkit-transition-duration: 2s;

-webkit-transition-timing-function: ease-in-out;

-webkit-transition-delay: 1s;

/* Standard syntax */

transition-property: height;

transition-duration: 2s;

transition-timing-function: linear;

transition-delay: 1s;

}

 

what is closest in jquery ? What’s the difference between .closest() and .parents(‘selector’)?

.closest() method begins its search with the element itself before progressing up the DOM tree, and stops when current element matches the selector.

.parents() Begins with the parent element, get the parent of each element in the current set of matched elements

What is json?

JSON stands for JavaScript Object Notation. JSON is language independent, lightweight data interchange format. JSON data is written as key value pairs.

Eg :”name”:”Selva”

Explain position property in css?

The CSS positioning properties allow you to position an element. There are four different positioning methods: Static, Fixed, relative, absolute.

 

 

 

Difference between $(this) and this in jquery?

Keyword ‘this’ is a native DOM element. $(this) is a jQuery object that allows you to call functions such as .addClass() on it.

Will HTML5 canvas supported in IE ?

HTML5 canvas is not supported in IE version less than 9. ExplorerCanvas(excanvas) a JS library is the option to render HTML5 canvas for IE6, 7, and 8.

what is jsonp?

JSONP is nothing but JSON with padding. JSONP is mostly used in RESTFull APIs(Cross domain request). JSONP is a simple trick to overcome XMLHttpRequest same domain policy. (As you know one cannot send AJAX (XMLHttpRequest) request to a different domain.). JSONP request appends the callback function with URL. Eg: http://www.abcs.com/example.php?callback=simplecallback

Whenever the server receives the callback it will return the data. The data can be accessed using that call back function.

A simple implementation of JSONP request.

//

(function() {

var flickerAPI = “http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?&#8221;;

$.getJSON( flickerAPI, {

tags: “mount rainier”,

tagmode: “any”,

format: “json”

})

.done(function( data ) {

$.each( data.items, function( i, item ) {

$( “” ).attr( “src“, item.media.m ).appendTo( “#images” );

if ( i === 3 ) {

return false;

}

});

});

})();

// ]]>

 

 

 

How do you create a simple plugin in jquery?

Sample plugin creation code is given below:

(function($){

$.fn.showLinkLocation = function() {

return this.filter(‘a’).each(function(){

$(this).append(

‘ (‘ + $(this).attr(‘href’) + ‘)’

);

});

};

}(jQuery));

 

// Usage example:

$(‘a’).showLinkLocation();

 

List out some CSS Frameworks for creating responsive templates?

Bootstrap

-> Bootstrap is mobile first framework. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.

 

Foundation 3

-> Foundation 3 is built with Sass, a powerful CSS preprocessor. “Pricing Tables” is an interesting componenet in foundation 3. Pricing tables are suitable for marketing site for a subscription-based product. It also offers super cool features like Right-to-left text direction support.

 

Skeleton

Skeleton is a small collection of CSS files that can help to rapidly develop sites that look beautiful at any size, be it a 17″ laptop screen or an iPhone.

 

YAML 4

YAML 4 is built on SAAS. You can check the documentation in the above link.

 

ResponsiveAeon

Responsive Aeon is a simple, fast, Intuitive css framework. It contains almost 120 lines of code and only 1kb minified.

 

 

 

 

 

What is the difference between canvas and svg?

<canvas> is an HTML element which can be used to draw graphics using JavaScript. This can be used to draw graphs, create animations etc.

The <canvas> element is not supported in older browsers, but is supported in recent versions of all major browsers.

The default size of the canvas is 300 px × 150 px (width × height). But custom sizes can be defined using the HTML height and width property.  The declaration is as follows.

<canvas id=”animate” width=”250″ height=”250″></canvas>

SVG stands for Scalable Vector Graphics (SVG) is based on XML markup language, for describing 2D vector graphics.

Can you explain the difference between cookies, sessionStorage and localStorage.?

LocalStorage stores data with no expiration date, and gets cleared only through JavaScript, or clearing the Browser Cache / Locally Stored Data – unlike cookie expiry.

Local storage and session storage are perfect for non sensitive data. The data stored in localStorage and sessionStorage can easily be read or changed from within the client/browser

so should not be relied upon for storage of sensitive or security related data within applications.

Data stored in the SessionStorage is only available for the duration of the browser session (and is deleted when the window is closed) – it does however survive page reloads.

In cookie, we can store 4096 bytes of data. Data stored in the cookie can be hacked by the user, unless the site uses SSL. We can also prevent injections like Cross-Site Scripting (XSS)/Script injection using httponly in the header.

Explain about quirks mode?

There are three modes used by the layout engines in web browsers: quirks mode, almost standards mode, and full standards mode.

Quirks mode is turned on when there is no correct DOCTYPE declaration, and turned off when there is a DOCTYPE definition.

However, invalid HTML – with respect to the chosen DOCTYPE – can also cause the browser to switch to quirks mode.

 

 

What is meant by hardware acceleration?

It means the graphical rendering is done on dedicated hardware (your GPU / graphics card) rather than your CPU. Hardware acceleration generally produces more fluid animation.In general you should always enable hardware acceleration as it will result in better performance of your application.

This will usually be a higher frame rate (the number of images displayed per second), and the higher the frame rate, the smoother the animation.

How can you load css resources conditionally?

Using CSS media querises we can load CSS contidionally. If you want to load the stylesheet for the device less than 600px, then you can declare as below.

<link rel=”stylesheet” media=”screen and (min-width: 600px)” href=”small.css”>

This style sheet will only load for screen size less than 600px.

Difference between article and section tag in HTML5. How can you nest them in your document?

The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading.

So basically the section element should contain related information bunched under a common heading.

The HTML5 <article> element represents a complete composition in a web page or web application that is independently distributable or reusable, e.g. in syndication.

This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.

We can nest article inside a section tag and vice versa. This is completely legal interms of HTML5.

What happen when you dont use doctype?

When omitted, browsers tend to use a different rendering mode that is incompatible with some specifications.

Also HTML5 tags such as < article >,< footer >, < header >, < nav >, < section > may not be supported if the Doctype is not declared.

 

 

 

 

What are data- attributes good for?

The data-* attributes is used to store custom data related to the page or application.The custom data can be used in JavaScript to complete events or animations.

Which set of definitions, HTML attributes or CSS properties, take precedence?

CSS properties take precedence over HTML attributes. If both are specified, HTML attributes will be displayed in browsers without CSS support but won’t have any effect in browsers with CSS support.

How do I eliminate the blue border around linked images?

in your CSS, you can specify the border property for linked images:

a img { border: none ; }

However, note that removing the border that indicates an image is a link makes it harder for users to distinguish quickly and easily which images on a web page are clickable.

 

Explain about HTML5 local storage ?

There are two ways to store data in HTML as objects locally :

 

  1. localStorage – store data across session acess
  2. sessionStorage – storing data for current session only

Data will be stored in key/value pair format.

example:

localStorage.empid=”420″;

sessionStorage.companyname = “Thiruvarur info tech ”;

 

explain CSS media queries ?

CSS media queries are used to develop responsive templates for different layout of screen, print, mobile , tablet or any other resolutions

 

CSS media queries can be added in 3 ways as like CSS style sheet :

 

Internal stylesheet :  <style type=”text/css”>

@media only screen and (max-width: 600px){

/* rules apply to the device resolution is 480px or less  */

}

</style>

Imported stylesheet :   @import “tablet.css”   (min-width: 800px) and (max-width: 1200px);

External stylesheet:  <link rel=”stylesheet” type=”text/css” href=”deskto.css” media=”screen and (min-width: 1200px), print and (min-resolution: 300dpi)” />

 

 

explain css inheritance ?

Inheritance propagates property values from parent elements to their children. The inherited value of a property on an element is the computed value of the property on the element’s parent element. For the root element, which has no parent element, the inherited value is the initial value of the property.

<div class=”firstClass secondClass thirdClass fourthClass ” > </div >

what is javascript inheritance ?

In simple terms, inheritance is the concept of one thing gaining the properties or behaviours of something else.

Inherited children inherit their parent’s behaviour To say A inherits from B, is saying that A is a type of B.

In JavaScript You must use a special object called prototype.

function Animal() {}; // This is the Animal *Type*

Animal.prototype.eat = function () {

alert(“All animals can eat!”);

};

 

function Bird() {}; // Declaring a Bird *Type*

Bird.prototype = new Animal(); // Birds inherit from Animal

Bird.prototype.fly = function() {

alert(“Birds are special, they can fly!”);

};

The effect of this is that any Birds you create (called an instance of Bird) all have the properties of Animals

var aBird = new Bird(); // Create an instance of the Bird Type

aBird.eat(); // It should alert, so the inheritance worked

aBird.fly(); // Important part of inheritance, Bird is also different to Animal

 

var anAnimal = new Animal(); // Let’s check an instance of Animal now

anAnimal.eat(); // Alerts, no problem here

anAnimal.fly(); // Error will occur, since only Birds have fly() in its prototype

 

explain javascript associative array ?

Associative arrays are where we can associate a key string with a value string

JavaScript objects are also associative arrays.

i.e the property  emp.Name can also be read by calling emp[‘Name’]

We can access each property by entering the name of the property as a string into the array

it refers to accessing the DOM elements of HTML also [as object or associative array]

 

 

 

explain JS Namespace ?

Namespacing is a technique employed to avoid collisions with other objects or variables in the global namespace

and also helps to organize blocks of functionality into easily manageable groups that can be uniquely identified.

JavaScript doesn’t  builtin support of namespacing but using objects and closures we can achieve a similar effect.

javascript Namespacing patterns :

1)    Single global variables :

var myApplication =  (function(){

function(){

/*…*/

},

return{

/*…*/

}

})();

 

2)    Object literal notation :

var myApplication = {

getInfo:function(){ /**/ },

// we can also populate our object literal to support

// further object literal namespaces containing anything

// really:

models : {},

views : {

pages : {}

},

collections : {}

};

 

 

 

 

 

 

3)    Nested namespacing :

var myApp =  myApp || {};

// perform a similar existence check when defining nested

// children

myApp.routers = myApp.routers || {};

myApp.model = myApp.model || {};

myApp.model.special = myApp.model.special || {};

// nested namespaces can be as complex as required

 

4)    Immediately-invoked Function Expressions :

// an (anonymous) immediately-invoked function expression

(function(){ /*…*/})();

// a named immediately-invoked function expression

(function foobar(){ /*..*/}());

// this is technically a self-executing function which is quite different

function foobar(){ foobar(); }

 

5)   Namespace injection :

// define a namespace we can use later

var ns = ns || {}, ns2 = ns2 || {};

// the module/namespace creator

var creator = function(val){

var val = val || 0;

this.next = function(){

return val++

};

 

this.reset = function(){

val = 0;

}

}

creator.call(ns);

 

// ns.next, ns.reset now exist

creator.call(ns2, 5000);

// ns2 contains the same methods

// but has an overridden value for val

// of 5000

 

 

 

 

Type of webservice ?

there are two types of web service….1. SOAP [Simple Object Access Protocol] Webservice and 2. RESTful [REpresentational State Transfer] Webservice.

SOAP is a messaging protocol , REST is a design philosophy , not a protocol.

SOAP:

you define your interface in a .wsdl file, which describes exactly which input parameters are expected and how the return values will look like

there are tools to generate the .wsdl files out of java class hirarchies. JAXB for example

there are also tools to generate java objects/classes as part of eclipse for example (don’t know the name in the moment).

SOAP is very strict. Every request is validatet against the wsdl before processing.

A good but not so easy to start with framework for SOAP WS is Apache CXF

 

REST:  (no hands on experience up to now, feel free to correct and improve 😉 ):

a way to access a webserver or web application to retrieve data from or send to it.

it’s only negotiated, how it is accessed.

common is something like this http://server.domain.com/app/type/id=123 to retrieve object of type type with id=123 very intuitive, but no automatic validation of requests.

The main advantages of REST web services are:

  1. Lightweight – not a lot of extra xml markup
  2. Human Readable Results
  3. Easy to build – no toolkits required

SOAP also has some advantages:

  1. Easy to consume – sometimes
  2. Rigid – type checking, adheres to a contract
  3. Development tools

 

 

 

What is namespacing?

In many programming languages, namespacing is a technique employed to avoid collisions with other objects or variables in the global namespace. They’re also extremely useful for helping organize blocks of functionality in your application into easily manageable groups that can be uniquely identified.Namespacing Fundamentals

  1. Single global variables
  2. Object literal notation
  3. Nested namespacing
  4. Immediately-invoked Function Expressions
  5. Namespace injection

 

Single global variables

One popular pattern for namespacing in JavaScript is opting for a single global variable as your primary object of reference. A skeleton implementation of this where we return an object with functions and properties can be found below:

var myApplication =  (function(){

function(){

/*…*/

},

return{

/*…*/

}

})();

Object literal notation

Object literal notation can be thought of as an object containing a collection of key:value pairs with a colon separating each pair of keys and values. It’s syntax requires a comma to be used after each key:value pair with the exception of the last item in your object, similar to a normal array.

var myApplication = {

getInfo:function(){ /**/ },

// we can also populate our object literal to support

// further object literal namespaces containing anything

// really:

models : {},

views : {

pages : {}

},

collections : {}

};

 

 

One can also opt for adding properties directly to the namespace:

myApplication.foo = function(){

return “bar”;

}

myApplication.utils = {

toString:function(){

/*..*/

},

export: function(){

/*..*/

}

}

 

  1. Nested namespacing
  2. Immediately-invoked Function Expressions (IIFE)s
  3. Namespace injection

 

  1. Explain about css specificity

 

  1. what is the use of box shadow and tell me the syntax.

 

  1. how to acheive rounded corners in css3.

 

  1. How will you improve the performance of a website.

 

  1. What is the use of sprite images.

 

  1. What are the different font formats and how will you include in your css stylesheet.

 

  1. What is responsive web page layout.

 

  1. What is fluid layout and advantages of it ?

 

  1. What do you know about css animations. Will you do css3 animation if we give google access?

 

  1. what are the css frameworks you know. have you ever used any css frameworks like LESS SAAS?

 

 

 

 

 

 

 

 

 

  1. Difference between HTML4 and HTML5?

 

  1. What is the use of canvas ? have you ever used it.

 

  1. What is the main difference between canvas and svg?

 

  1. What are semantic tags in html5. What is the main advantage of it.

 

 

 

  1. How will you add a jquery to your page.

 

  1. What is the diiference between javascript and jquery?

 

  1. Tell me the difference between document.ready and onload function in jquery?

 

  1. how can u apply css in jquery?

 

  1. Can you dynamicaaly add a div using jquery ?

 

  1. What are filters in jquery?

 

  1. What is an anonymous function in jquery and how will you define it?

 

  1. Have you ever heared about MVC in javascript?

 

  1. Javascript or Jquery which is faster ?

 

  1. How can you animate using Jquery?

 

  1. Tell me the use of is() , eq() methods in jquery?

 

  1. Why we use index() method in jquery.

 

  1. Tell me jquery.noConflict() method.

 

  1. Have you ever contributed any plugin?

 

  1. Tell me what are the Jquery UI you know. And how can you customize them.?

How to Hunt for a Job Using Social Media

March 14, 2014 Leave a comment

apps
Securing a job is the tough part, but scouting an open position? All it takes is a strategic scroll through your favorite social media accounts.

Sites like Twitter and Facebook can be fun and frivolous, but they’re also viable business opportunities. Plumbing through accounts, hashtags and personal pages could help launch next potential career.

Want to find a writing opportunity in a town near you? Just look up a hashtag on Twitter. Want to stay up to date with a company’s career openings? “Like” them on Facebook. Want to create a beautiful resume that’ll catch a recruiter’s or hiring manager’s eye? Head over to Pinterest.

Here’s how to land your perfect job via social media.

1. Twitter
use-twitter-640x360

In 140 characters or less, Twitter can help you find your dream gig. It’s teeming with job applications and professional networking pages, if you know where to find them.

a. Searches: Use that search bar to look for terms that apply to the job you want. For best results, type in words like “jobs,” “hiring” and other specifics that apply to your desired field and location; for example, “writer” and “New York City.”

b. Hashtags: Typing #jobs and #hiring will result in a plethora of tweets from those seeking employees. Employers who want to cast a wide net will often tweet out job applications, with accompanying hashtags.

c. Tweet often: Though it depends on your career of choice, tweeting is a great way to network with like-minded folks in your profession. Follow businesses and people you’re interested in and don’t be afraid to send them the occasional tweet. (On that note, make sure your Twitter account is polished and professional).

d. Follow away: There are dozens and dozens of Twitter accounts dedicated to posting job applications. Go to the search bar and type in “jobs,” then click “People” on the left-hand side. You’ll soon see all the Twitter accounts with “jobs” in the username and can gleefully press the “Follow” button.

2. Facebook
facebookprivacy-640x360

Facebook is an undeniable social media juggernaut. According to its representatives, these are the top tips for trying to get a job through Facebook:

a. “Like” some pages: Most companies strive for dynamic social media presences, and Facebook Pages are engagement 101. By “Liking” them, you can get daily updates about their activity. Plus, they will likely post links to available job applications.

b. Private/Public: Take a thorough look at your privacy settings on Facebook, and make sure you know exactly how others view your Timeline. However, you should consider setting your work and education info public, enabling others to see your professional history.

c. Stay updated: Make sure all of your work and education info is up to date and reflects your current position and past experience.

d. Add “Professional Skills:” A few months ago, Facebook added a “Professional Skills” portion to the “About” section. Underneath work and education, add skills you’ve acquired, optimizing your professional appeal.

3. LinkedIn

linkedin-path-640x360

Perhaps the most obvious of job hunting sites, LinkedIn is the network of choice for professionals.

a. Connect: Unlike Facebook, it’s a little less creepy to connect with strangers on LinkedIn, because everyone there is looking for networking opportunities. Connect to people who have careers you’re interested in, and search around for those who might only be one degree away from you. For inspiration, check out the member stories portion of LinkedIn’s blog, where users share their success anecdotes about networking through the site.

b. Jobs Board: Not only does the site provide you with advice and connections, but it also has a jobs board highlighting available opportunities in nearly every field.

c. Endorsements and recommendations: There’s a portion of your profile dedicated to glowing recommendations and endorsements from your peers. Try to get as many as you can, and your page’s likability will instantly boost.

d. Share more: According to LinkedIn’s Career Expert, Nicole Williams, sharing articles or content with your network boosts your chances 10 times for getting contacted by a recruiter. When you share content, it proves your knowledge in the industry.

e. List all the things: Your profile is 12 times more likely to be viewed by a hiring manager if you have a detailed list of work experience, Williams says. The more robust your profile is, the more experienced and hirable you look.

4. Tumblr

tumblr-use-640x360

You can use Tumblr, that vast Internet playground of GIFs and rabid fandoms, for help in the job search.

a. Search tags: In the search bar, look for tagged terms like “hiring” and “jobs.” It’s a bit harder to separate the wheat from the chaff in the tag-happy blogging community, but you’ll still be able to find plenty of cool companies advertising open jobs via Tumblr.

b. Start Tumbling: This is especially important if you’re the creative type. A Tumblr account attuned to your interests, and full of your own original content, automatically ups your unique appeal to employers. In addition, a good Tumblr following can lead to job offers from employers who happened to stumble upon your site.

5. Pinterest

Pinterest-8-640x360

Yes, Pinterest is more than just a pretty place to find wedding inspiration and delicious recipes.

a. Pin your résumé: Tired of the standard, one-sheet format? Use a Pinterest board to “pin” your résumé. You can highlight certain aspects of your experience and add photos and links. See Rachael G. King, a social media manager at Sidecar who created a “living résumé.”

b. Follow these pages: For a never-ending well of job tips and opportunities, follow these seven helpful Pinterest boards.

My Team Plugin for WordPress

December 19, 2013 1 comment

We are  happy to release “My Team” a new WordPress to display team/staff members. You can also display a set of pictures and information in different layouts.

Nowadays, WordPress is more than just a blog. And behind such website is a team. The plugin acknowledges those guys, by creating a template which anyone can copy in his theme directory and have a page ready for the people behind it. The plugin provides the administrator with a nice interface to add/edit/delete the team members. The plugin is under active development so keep checking the page. The plugin uses the short-code given at

http://wordpress.org/plugins/wp-my-team/

Features:

You can display the entries in 4 different main ways

  1. Grid view.
  2. Grid view with Information on hover.
  3. Table list view.
  4. Number of Columns.
  5. Image Shapes and effects.
  6. Text Align.
  7. Special Settings.
  8. Image Sizes.
  9. Email Settings.
  10. Single Page Settings.
  11. Auto Generation Shortcode & PHP Function.

screenshot

7 Reasons Why WordPress Made PHP Popular, not PHP Frameworks – PHP Classes blog

7 Reasons Why WordPress Made PHP Popular, not PHP Frameworks

1. WordPress is the Most Popular PHP Application

Counting the number of search results on several popular search sites may seem to be a way to measure the relative popularity of a technology, language, application or a product.

However, that way does not seem to be very reliable method. When a search site changes its algorithms, you may see changes in the results that really do not have to do so much changes in the popularity of those technologies.

A more reliable way to measure the relative popularity of a technology is to resort to Google Trends. This is a site that Google provides to show the evolution of the relative number of searches done by given keywords over time.

As you may see in the following Google Trends chart, WordPress is much more popular than other PHP applications like Joomla, Drupal, Magento (which is Zend Framework based).

Google Trends: WordPress, Joomla, Drupal, Magento, Zend Framework

Google Trends - WordPress, Joomla Drupal, Magento, Zend Framework

2. WordPress alone is much more popular than any PHP framework

Using Google Trends you can also compare the popularity of different PHP frameworks. If you compare the popularity of WordPress with Zend Framework, Symfony PHP and CakePHP, as you may see in the chart below, WordPress is much more popular than all these PHP Frameworks together.

Google Trends: WordPress, Zend Framework, Symfony PHP, CakePHP

Google Trends - WordPress, Zend Framework, Symfony PHP, CakePHP

3. WordPress does not use third-party PHP frameworks

WordPress has been using some third-party components but they are not really full-stack frameworks. This implies WordPress never needed a full-stack framework to be built. The use of such frameworks would hardly make a difference to its popularity.

4. Applications make technologies popular, not components

In the chart above you may  notice that Magento is much more popular than Zend Framework. Magento is built on Zend Framework. This seems to imply that what makes applications popular is whether they solve users problems, not the components that they are built on.

WordPress is also popular because it is useful to many users. When users need to host a WordPress installation they need to seek a PHP hosting service. So they know at least superficially what is PHP and that they need PHP hosting.

This means that WordPress helped making PHP even more popular. The more installations there are of WordPress, the more PHP becomes popular.

5. The Extensible WordPress plugin ecosystem

One of the most important reasons that made WordPress popular is the myriad of plugins that were developed to provide additional features.

There are WordPress plugins for practically everything, including those that can turn it into other applications besides being a blog system. There are plugins that can turn it into forums, e-commerce sites, trouble ticket systems, etc., anything.

If WordPress as blog application was already popular, it became even more popular as a platform that can be turned into any type of application.

6. Non-Programmers develop in PHP just because of WordPress

If you need a site that requires certain features that WordPress does not have, you can develop new plugins to extend WordPress further and taylor it to your needs.

Many of the WordPress users were not really programmers. They started programming because they needed to have features in WordPress for which there was no suitable plugin providing them.

This means that many non-programmers had to learn PHP to be able to develop new WordPress plugins. That helped making PHP more popular even among non-programmers.

7. Pragmatism is better than Purism

In sum I could say that WordPress and PHP in general became popular because they can be used to address practical needs of many users.

Neither WordPress nor PHP are examples of software projects that are technically beautiful, are consistent, always follow well-thought project plans and adopt praised design patterns.

But that does not matter. They were created by people with a very pragmatic sense. They were focused on solving real world needs.

As for many of the PHP frameworks, they seem to have been developed in a totally different planet. They are often developed by purist people that seem to be more concerned with the number of design patterns they employ in the framework components than with being pragmatic and solve real PHP application needs.

To make it worse, many PHP frameworks systematically adopt practices of other frameworks developed for other languages. That raises totally unnecessary difficulties for PHP developers that try to use them.

One example of this problem is the configuration formats. In the Java world it is still usual to use XML as format for storing configuration values. XML is a portable format that can be written by humans. It was certainly a progress when compared with binary formats used to serialize data structures by C++ applications in the past.

This was a fine solution in the year 2000 but the fact is that XML is a drag. You need to keep opening and closing tags for every value. Sometimes values are stored as tag attributes, other times as tag values. It is often a pain to use.

Then Ruby On Rails came with the promise to get rid of some of the pains of the Java world habits. Instead of using XML, they decided to use YAML, which is a simplified markup language. It is simpler than XML but it is yet another format that you need to learn.

Several PHP frameworks were built copying Ruby on Rails practices, including the use of YAML as configuration format. Many years have passed and they still used YAML.

If you are a PHP developer, the format you are most familiar with is PHP. Why don’t these PHP frameworks make the lives of PHP developers better and adopt PHP scripts as configuration formats? PHP scripts can even be cached and so be loaded much faster.

In the worst case, if you need to use a more portable format, why these PHP frameworks do not use the JSON format to store configuration values? JSON is JavaScript. Every PHP developer knows JavaScript. It is only natural to adopt JSON nowadays.

Unfortunately many PHP frameworks as still stuck with formats that are not a natural choice for PHP developers, like XML, YAML or even INI (a legacy format of the Windows world).

I always get this feeling that PHP frameworks are not meant to please PHP developers. They seem to have been thought to please Java or Ruby developers. To make it worse, many of the newer PHP frameworks keep copying the same mistakes of older frameworks.

Obviously there are exceptions. There are indeed some PHP frameworks that were developed in a more pragmatic way for PHP developers. You can easily learn them without having to learn about Java or Ruby frameworks first.

Unfortunately those seem to not be the PHP frameworks that get more visibility. Maybe it is time for the PHP framework developers rethink their approach and think more about the PHP developers than about developers of other languages.

Shall I develop My Sites with WordPress or with a PHP Framework?

One frequent dilemma that PHP developers have is whether they should develop sites on top of WordPress or develop them from scratch based on a existing PHP framework?

This is a tough call. If the site is a blog, it may be an obvious choice to create it based on WordPress and save lots of development time. If the site is more than a blog but there are plugins for the functionality you need, WordPress may still be the best option.

Now if your site is very different than a blog, the amount of code that you would reuse from WordPress would be much less when compared to the whole project size. In that case, it may be better to start the development of the site from scratch.

If you still need a blog, you can use WordPress in a separate domain or a separate directory of your site.

For the bulk of the functionality you need to develop, you can use a existing PHP framework to gain some development time, or use your own framework if you have a good capable framework to address your needs.

Personally I tend to go for the last option. I can have more control of my project, but I am well aware that this route can take me more time to develop and fix eventual bugs in the code.

Frameworks are good when they enforce a productive method

Despite of the problems described above that many PHP frameworks have, for some people adopting a framework is probably the best solution, especially if it is what is called a “opinionated framework”.

That is what are called frameworks that impose a certain development methodology. This means that there is only one way to develop applications with those frameworks.

The reason why this is a good solution for some developers is because they do not have a well defined development methodology. This means that they do not know how to start, how to progress and how to deploy an application, unless somebody tells them how to do it.

Since opinionated frameworks impose a certain development method, the developers learn how to develop their applications following the methodology imposed by the framework.

One example of opinionated framework is Ruby on Rails. PHP frameworks that are inspired in Ruby On Rails tend to be also opinionated.

Opinions are not Facts

Well this article is just about my opinion and my experience of as developer that has been creating software for several decades now.

But opinions are just that, points of view of specific people. Expressing an opinion does not mean it is the only way to interpret the facts.

Just like the Tiobe Index people expressed their opinion stating that PHP popularity growth was due to Zend Framework 2 release last year, other people may express a different interpretation of the facts.

What do you think? Do you have a different opinion about what was discussed in this article? Post a comment to tell what you think.

Quake hits northwest China; 75 dead

(CNN) — Rescue teams are scrambling to reach the site of Monday morning’s strong and shallow earthquake in northwest China that has killed at least 75 people, according to state media.
Another 584 people were injured in the quake which tore through Gansu Province, state media reported.
The quake hit along the border of two counties — Min and Zhang — at around 7:45 a.m. local time, according to state news agency Xinhua.
Emergency services are converging on the area, including the Red Cross Society of China, which is sending 200 tents and other supplies to shelter and sustain those left without homes.
According to state broadcaster CCTV, Chinese President Xi Jinping has urged crews to prioritize the rescue of survivors and minimize casualties.
The original quake and powerful aftershocks caused roofs to collapse, cut telecommunications lines and damaged a major highway linking the provincial capital of Lanzhou to the south, according to the China Daily newspaper.
© NAVTEQ 2012 Terms of Use

More than 300 armed police troops and 64 heavy machines have been dispatched to repair National Highway No. 212, the paper reported. Train services in the area have also been suspended.
Rescue efforts are expected to be hampered by heavy rain that’s soaked the region in recent weeks. More rain is forecast and experts have warned about potential landslides.
According to the Gansu Provincial Seismological Bureau, the quake registered a magnitude of 6.6, however the U.S. Geological Survey said it was a 5.9-magnitude tremor, which struck at the relatively shallow depth of about half a mile (1 kilometer).
The epicenter was eight miles (13 kilometers) east of Chabu and 110 miles (177 kilometers) south-southeast of Lanzhou, the USGS said.
Tremors were still being felt from the quake, Xinhua said, quoting sources within the Min County government. Locals said buildings and trees shook for about a minute.
Residents within the earthquake zone took to Weibo — China’s version of Twitter — soon after to describe how the earth shook.
“This morning at 7:40 I was brushing my teeth, all of a sudden everything shook for a few moments, I thought I didn’t get enough sleep last night and was feeling dizzy,” @wyyy wrote. “Turns out it was an earthquake, sigh, seems that with the huge rain downpour outside, we really don’t know how much longer this planet is going to let us live here.”
Another, @dengdjianjyany, said: “Gansu earthquake. So many natural disasters in so short a time, another flood, another landslide, another earthquake, another something. And it’s not finished, my God ~ is there any safe place left? Wish everybody a life of peace”
@Heidiping: “Another earthquake, life really is fragile, survivors, be at peace!”

 

Get line number of the code

July 9, 2013 2 comments
<!--?
class myTest
{
function addMyAddress($street)
{
echo "
In class function at:".__LINE__;
echo "
class function called from:";
$e = new Exception();
$trace = $e->getTrace();
echo '
';print_r($trace);
// OR print_r(debug_backtrace());
}
}
echo "
Class created at:".__LINE__; $obj = new myTest();
echo "
Function called at:".__LINE__; $obj->addMyAddress('A/13 Skyline');
?>

 

Get any Website Page Title From URL in PHP

Hey guys,here below describe the how to get the page title form any website page using  URL. Here for getting the page title we are using the file_get_contents function.This one also achieve using fopen( ) but in some servers disabled this function now a days due to some security reasons.

Here below shows the PHP code to get the page title form the URL.

<!--?php
function pageTitle($page_url)
{
     $read_page=file_get_contents($page_url);
     preg_match("/<title.*?>[\n\r\s]*(.*)[\n\r\s]*<\/title>/", $read_page, $page_title);
      if (isset($page_title[1]))
      {
            if ($page_title[1] == '')
            {
                  return $page_url;
            }
            $page_title = $page_title[1];
            return trim($page_title);
      }
      else
      {
            return $page_url;
      }
}

?>

Jquery Timeago Implementation with PHP.

Nowadays timeago is the most important functionality in social networking sites, it helps to updating timestamps automatically. Recent days I received few requests from 9lessons readers that asked me how to implement timeago plugin with dynamic loading live data using PHP. In this post I am just presenting a simple tip to implement timeago in a better way.

Why Live Query
LiveQuery utilizes the power of jQuery selectors by binding events or firing callbacks for matched elements auto-magically, even after the page has been loaded and the DOM updated.

Code
Contains javascipt code. $(this).timeago()- here this element is refers to timeagoclass selector of the anchor tag.

 

// <![CDATA[
javascript” src=”js/jquery.min.js”>
// ]]>
// <![CDATA[
javascript” src=”js/jquery.livequery.js”>
// ]]>
// <![CDATA[
javascript” src=”js/jquery.timeago.js”>
// ]]>
<script type=”text/javascript”>
$(document).ready(function(){
$(“.timeago”).livequery(function() // LiveQuery
{
$(this).timeago(); // Calling Timeago Funtion
});
});
</script>

//HTML & PHP Code
<!–?php
$time=time(); // Current timestamp eg: 1371612613
$mtime=date(“c”, $time); // Converts to date formate 2013-06-19T03:30:13+00:00
?>

You opened this page <a href=’#’ class=’timeago’ title=”<!–?php echo$mtime; ?>“></a>

 

ONLINE MARKETING TIPS

June 26, 2013 13 comments

SEO-INTRODUCTION

Internet has become a powerful marketing source for the benefit of mankind. Many websites are available in the

internet, fulfilling various purposes. These websites need to be in the top rankings in the search engines to maintain

its popularity and to increase the volume of traffic to the site. Search Engine optimization (SEO) serves the above

purpose. If the pages of the website are optimized with high targeted key words, the rank of the site increases.

Higher the rank, higher is the amount of visitors to the site.

Maintenance of Ranks:

Search engine Optimization involves a number of techniques to increase the ranking and sales of the website

through search engines. Some of the points to be noted for Search engine optimization are,

Keywords: The web pages should be rich in content, communicative and item-specific. The web pages should

contain the highly specific keywords which are frequently searched by the users. This helps to increase the position

of the website in the search engine. For optimization purpose, the pages should be checked with keyword density

analyzers.

Link Popularity: The links in the website is marked factor which decides the ranking of the website. The number of

incoming links which conjoin to various files, directories, keywords and also to other sites is called as link

popularity.

Good Content: The content of the website should be periodically updated so that it becomes alive and effective. The

website should contain good content for the visitors to use it efficiently. Also, the content’s flow throughout the

page should be relevant. Thus clarity and relevancy are the key points to be noted for search engine optimization.

Pay Per Click: Another method of increasing the website’s popularity is pay per click advertisements. According to

this method, the website owner maintains an agreement with the search engine on a specific keyword. Every time

when a user clicks the keyword, the owner is supposed to pay a specific amount mentioned in the agreement. Thus

the ranking of the site is increased followed by good volume of traffic.

Accordant Title Tags: Relevant title tags and meta tags should be given to the web page for user convenience. The

title tags should be shorter in length with 6-8 words and should not be too critical to analyze. The description tag is

also required to describe briefly the content of the web page. Readability will also increase the number of visitors to

the site.

Web Design Factors: The factors involving web site design also affects the ranking of the website. Some of them are;

Frames: Certain search engines are not compatible using frames. For the website which uses frames, they should

also use NOFRAMES section in each page to avoid the above said backward compatibility of certain search

engines.

Better Indexing: Avoiding graphics in the web pages containing keywords will help in better indexing of the search

engines. If the html code is less, then the search engine can access it faster and easier. Search engines are not

comfortable with the pages which are more than 100 Kbps.

Things to be Avoided: Flash should be avoided in a web page since it takes more time to explain a single concept

and also to load. PDF s should be avoided since there is no summary of the concept in the HTML. This reduces the

ranking of the website. Frames also should be avoided.

It is better to create the website with the following guidelines rather than to alter it depending upon the

consequences. Thus, care should be taken to during creation and maintenance of the website to place it in the higher

position of the search engine.

BASIC SEO BASIC SEO STEPS

  • 1. Choose relevant keywords for your site: It must be ensured that keywords chosen reflect the site’s purpose and

    content. Keywords and phrases which your target audience searches for should be selected. There is no point in

    using keywords or key phrases which nobody searches for. Any site needs targeted traffic and thus make sure that

    only relevant audience which may benefit or buy products from your site visits. So choose your keywords wisely.

    There are various keyword research tools – both free and paid which may help you in selecting the best keywords for

    you.

  • 2. Keyword rich relevant content: A website should have excellent content reflecting the sites purpose and

    intentions. Care should be taken that keywords and phrases are not stuffed in the content. Keyword stuffing maybe

    construed as spamming by search engines.

  • 3. Proper use of Title tags: Any webpage should have title tag with the keywords that you have chosen. This is

    single most important aspect of search engine optimization.

  • 4. H1 tags with keywords for content titles: Content titles should have targeted keywords using H1 tags.
  • 5. Link optimization: Placing targeted keywords into the links is an important factor because search engine robots

    read the links as they crawl the webpage. Their algorithms understand the association between the anchor text and

    the page that has been linked.

  • 6. Image Optimization: A SEO Consultant must also ensure that images used in the website have descriptive,

    keyword-rich alternative attributes (alt) that are useful for visitors and search engines alike.

  • 7. Sitemap: Sitemap with text links to all the pages of a website is very important to ensure that search engines bots

    crawl every webpage.

  • 8. Directory structure: A SEO specialist should ensure that website should have a flat directory structure.
  • 9. A website should be listed in open directory. And as part of regular site SEO maintenance a site submitted to

    trusted, human-reviewed online directories.

  • 10. Meta tags: All the web pages in a site should have keyword-rich Meta descriptions. Though, their importance

    has decreased in last few years, using them appropriately is advisable.

BELOW, SOME HIGHLIGHTS (VIA SEARCH ENGINE LAND). BELOW, SOME HIGHLIGHTS (VIA SEARCH ENGINE LAND).

  • Rather than rankings and traffic, focus on conversions – that is, impact on revenue – as measures of success.
  • Calculate the ROI of our organic traffic as you would do for all other medium. Free organic traffic is
    possible, but investments are needed to attract masses and make changes to website, so you should invest
    resources, either with an agency or in-house people. Taking all the expenditure into account will give you
    an idea of how much profit you are getting from your organic traffic.
  • Keep in mind the possible downfalls of making your site focused on conversions. An often repeated truism
    in SEO circle is that content is all important when it comes to SEO. Yet there is a trade-off between content
    and usability or design; you should neglect neither. Including more content on the page should not hurt the
    conversions of the website.
  • Choose carefully and optimize SEO landing pages. Landing page optimization is as important in paid
    search campaigns as in organic SEO campaigns; both should be highly efficient in converting incoming
    traffic. A useful tool to test the success of SEO landing pages before you target them is Ad Words.
  • Optimize the snippet that appears on the search results page. This is the user’s first interaction with your
    website, and ultimately may determine the click through rate from visitors coming from search engines.
  • Use internal search to expand your keyword targeting on search engines and to give customers what they
    are looking for. Optimizing SEO by measuring the success of keywords bringing traffic to the website is
    great, but by doing that you lose a precious source of keywords your customers are typing in your website,
    i.e. your internal site search. This is what they are really looking for, and you should check if you are
    targeting those keywords.

PLEASE READ THIS CAREFULLY

  • URL Names – include relevant keywords – unique to each page.
  • Robots.txt – A file which permits or denies access to robots or crawlers to areas of your site.
  • Navigation Structure – Keep it simple.
  • Meta Tags – Title and Description. – Unique detail for each page, related to page content.
  • H1 Tags – Use for the short on page content description.
  • H2 and H3 Tags- Use for Headings for sub category’s within the Content
  • Page Content – Critical Component.
  • Keyword Visibility – Within page Content.
  • Image Alt Tags – Helps with Accessibility.
  • Privacy Policy – Assures trust and confidentiality.
  • The site should confirm to the W3C standards.
  • Create and submit sitemap’s – formatted in either .xml -.htm – .txt.
  • Create and submit RSS feeds to relevant feed directory’s
  • Create and submit Articles
  • Find relevant websites within the same market sector or niche and form a link partnership.
  • Submit your website to relevant or industry related directory’s.
  • A link exchange should be formed by utilising relevant keyword Anchor Text.
  • Utilise relevant Social Networks and Forums related to your Market Sector.
  • Utilise Blog sites relevant to your Market Sector.

SEO WORKS IN BRIEF:

  • Pre-optimization analysis of search engine readability, search engine saturation, domain name age and
    reputability

  • Keyword Effectiveness Index (KEI) research
  • Competitive analysis (includes SEO analysis of competitors’ websites and comparing their SEO features
    with yours) upon request
  • Site code enhancement (increasing keyword density, optimizing Meta tags, titles and other HTML elements
    such as alt-tags, etc)
  • URL optimization – making your urls search engine friendly
  • Manual submission to all major directories and search engines (if necessary)
  • XML and HTML sitemaps, robots.txt and robots Meta tags. Ensuring full website crawl ability and
    synchronization of website structure and content updates with major search engines upon request
  • Submission to Google Base, data feed updates, optimization upon request upon request
  • Local search marketing – submission to Google Local, Yahoo Local, Super pages, Yellow pages,
    CitySearch and more. Local search optimization. Upon request upon request upon request
  • Article submission, website reviews, blog advertising (blogvertising), and social book marking
  • Featured listings in hand-picked online directories upon request upon request upon request

ONLINE MARKETING

SEO STRATEGIES & SYSTEMATIC SEO

SEO = ON PAGE OPTIMIZATION + LINK BUILDING + QUALITY CONTENT &

SERVICES

SEO – INTRODUCTION
SEARCH ENGINE OPTIMIZATION
IMPROVES TRAFFIC / INCREASES VISITORS
OPTIMIZING OUR WEBSITE SEARCH ENGINE FRIENDLY
ZERO SEO
PRE-ANALYSIS REPORT
PROPMOTIONAL ARTICLES
PROFESSIONAL VIDEO
MAKE YOUR WEBSITE READY
KEEP YOUR KEYWORDS & TAGS READY
SEO – DAY 1
SITE SUBMISSION (Google, yahoo, bing, ask)
YMAIL & GMAIL
BLOGSPOT & WORDPRESS
TWITTER
SMS CHANNEL
GOOGLE SITE
LOCAL BUSINESS
SEO – WHILE IN PROGRESS
SEO UPDATIONS – LINK BUILDING + PROMOTIONAL EMAILS & SMS + OTHER
ONLINE CAMPAIGNS & SEO REPORT
SEO – SUCCESS SCORE
ANALYTICS
WEBMASTER
ALEXA
GRADER.COM
SEO ADD-ONS
BASIC SEO TIPS
TRY TO USE COMMON USER NAME
TRY TO USE COMMON EMAIL ADDRESS (COMPANY)
TRY TO USE COMMON PASSWORD (ALPHA-NUMERIC)
ON-PAGE OPTIMIZATION
CONTENT REVIEW
META TAG OPTIMIZATION
URL+CSS+FEED VALIDATION (w3 standards)
0FF-PAGE OPTIMIZATION
LINK BUILDING
OTHER ONLINE PROMOTIONAL CAMPAIGNS
LINK BUILDING – HAS NO LIMIT
ARTICLE SUBMISSION
POST CLASSIFIEDS
FORUM & GROUP DISCUSSION
Q & A WEBSITES
BLOGS & COMMENTS
EXCHANGE LINKS
PRESS RELEASE
SOCIAL BOOKMARKING
ADVERTISE ON ROI WEBSITES
IMPORTANT DIRECTORIES
INDEPTH SEO
RSS FEEDS
ROBOTS.TXT
WEBSITE OPTIMIZER
KEYWORD DENSITY
SEO TEAM
SEO TEAM HEAD
WEB DEVELOPER
CONTENT WRITER
SOCIAL BOOKMARKING
UPDATE WORKS
KEYWORD RESULTS
ONPAGE OPTIMIZATION
LINK BUILDING
CONTENT (KEYWORD DENSITY)
DOMAIN NAME
HITS/TRAFFIC
CONVERSION FORM
DOMAIN AGE
SEO FOOTNOTE STANDARDS
W3 STANDARDS
SEO ANGLE
STATIC & DYNAMIC SITES
CONTENT ORIENTED SITES
BUSSINESS – LEADS
APPLICATION ORIENTED
E-COMMERCE SITES
CLISSIFIEDS & REGULARLY UPDATING SITES
Back Up
Take a back up of your website.
Take a back up of your webmaster.
Take a back up of analytics.
Page Rank
Increase the number of pages.
Domain Age.
Freshness of the Content.
Inbound-Outbound Links.
Web Server & IP Address.
Speed & Load Time.
Domain Extension.

Website Visibility

On Page Optimization – SEO Basics

On page optimization is one of the very first step of SEO which every webmaster should look into.

CHAPTER: 1

OPTIMIZE THE TITLE AND META TAGS

Sample Title and Meta Tags Optimization

<title> googlecasestudy.com – get your free seo report </title>
<meta name="Description" content="get your free seo report from google case study, google case study, selvabalaji,
seo chennai" />
<meta name="Keywords" content="get your free seo report from google case study, google case study, selvabalaji,
seo chennai" />
<meta name="robots" content="index, follow" />
<meta name="revisit-after" content="7" />
<meta name="author" content="selvabalaji" />

Refer : http://www.searchenginejournal.com/on-page-optimization-a-complete-walkthrough/6746/

WordPress 3.5.2 Security Release

WordPress security team resolved seven security issues, and this release also contains some additional security hardening.

This is the second maintenance release of 3.5, fixing 12 bugs.

Go to your Dashboard » Updates and do it with 1 click.

The security fixes included:

  • Blocking server-side request forgery attacks, which could potentially enable an attacker to gain access to a site.
  • Disallow contributors from improperly publishing posts, reported by Konstantin Kovshenin, or reassigning the post’s authorship, reported by Luke Bryan.
  • An update to the SWFUpload external library to fix cross-site scripting vulnerabilities. Reported by mala and Szymon Gruszecki.
  • Prevention of a denial of service attack, affecting sites using password-protected posts.
  • An update to an external TinyMCE library to fix a cross-site scripting vulnerability. Reported by Wan Ikram.
  • Multiple fixes for cross-site scripting. Reported by Andrea Santese and Rodrigo.
  • Avoid disclosing a full file path when a upload fails. Reported by Jakub Galczyk.

Download WordPress 3.5.2 or update now from the Dashboard → Updates menu in your site’s admin area.

DEVELOPERS : If you are testing WordPress 3.6, please note thatWordPress 3.6 Beta 4 (zip) includes fixes for these security issues.Download WordPress 3.6

 

Facebook introduces video on Instagram

June 22, 2013 5 comments

BaltNEW YORK: Facebook is adding video to its popular photo-sharing app Instagram, following in the heels of Twitter’s growing video-sharing app, Vine.

Instagram co-founder Kevin Systrom said on Thursday that users will be able to record and share 15-second clips by tapping a video icon in the app. They can also apply filters to videos to add contrast, make them black and white or different hues.

“This is the same Instagram we all know and love but it moves,” he said at an event held at Facebook’s Menlo Park, California, headquarters.

Vine, which launched in January, has 13 million users and lets people create and share 6-second video clips. Instagram has 100 million users, up from 20 million when Facebook bought the company more than a year ago. If users like it, Facebook’s move could propel mobile video sharing into the mainstream.

To use the video feature, Instagram users can tap on the same camera icon they use to snap photos. A new video camera icon will appear on the right side. Tap it and a screen with a red video button will let you record clips of sunsets, kids running in parks or co-workers staring at their computer screens.

The app will record as long as your finger is on the red button or for 15 seconds, whichever comes first. Not unlike Vine, taking your finger off the button will stop the recording, allowing you to shoot the scene from a different angle or record something else altogether. Once you have 15 seconds of footage, you can play it from the beginning and post it on Instagram to share with others.

Given Vine’s popularity, “it is perhaps more surprising that Facebook has not introduced video for Instagram sooner. There is no doubt Twitter will move quickly to up the ante on Vine and this could undercut Facebook’s efforts with video on Instagram,” said Eden Zoller, principal consumer analyst at Ovum, a technology research firm.

Step-by-Step guide to Facebook Conversion Tracking

Step 1: Once you log in to your ‘Ads Manager’ tab, click on the Conversion Tracking button on the left side bar.

FB-1

Step 2: Then click on the ‘Create Conversion Pixel’ tab to begin the process.

FB-2

Step 3: You will be directed to this pop-up, which will ask you for a:

1. Name: An appropriate name will help you remember what you are tracking. (Example: Lead Generation – GATE Ad)

2. Category: This will help you decide the type of action that you want to track on your site. You can choose from the following:

1. Checkouts

2. Registrations

3. Leads

4. Key Page Views

5. Adds to Cart

6. Other Website Conversions

(For the purpose of this example, we have selected ‘Leads’).

FB-3

Step 4: You will be able to see a pop-up window with a JavaScript code. This is the code that you will have to add to the page where the conversion will happen. This will let you track the conversions back to ads which you are running on Facebook.

FB-4

The code should be placed on the page that a user will finally see when the transaction is complete.

Here is the tricky part. The code should not go on all pages. For that matter, it should not even go to the landing page of your product. The code should be placed on the page that a user will finally see when the transaction is complete.

For Example: If you want to track when students register for your GATE coaching, paste the code on the registration confirmation page/thank you page and not on the form that they need to submit.

How do you confirm that your conversion is working properly?

1. Check that the javascript snippet has been placed on the correct conversion page. Visit the page where the pixel has been embedded, right click and go to ‘View Page Source’ to find the pixel. The code should have the tag of the HTML. See image below.

FB-5

2. Check that Facebook is receiving the conversion events from your website. Go to the conversion tracking tab in your Ads Manager account. There you will see a list of the conversion tracking pixels that you have created. If the conversion tracking pixel has been successfully implemented and a conversion event has been recorded, it will be reflected in the Pixel Status column. If the status shows active, it means that the page which contains the pixel has been viewed by users. If it shows inactive, it means that over the last 24 hours, the page with the pixel has not been viewed.

FB-6

3.Later, when you  create your Facebook ad , you need to check the track conversions box under the campaign, pricing and schedule tab to enable tracking.

FB-7

My Photo

April 24, 2013 Leave a comment

Balt

PHP Innovation Award Winner of 2012

Lately-In-PHP-Podcast

The PHP Programming Innovation Award Winner of 2012 was announced. An interview with the winner, Karl Holz from Canada, was one of the main topics of the episode 33 of the Lately in PHP podcast conducted by Manuel Lemos and Ernani Joppert.

They also discussed the usual batch of PHP topics of interest like Zend Optimizer+ source code that was released, the PHP 5.5 feature freeze and roadmap, as well an article that compares PHP to an Hobbit, as well other languages to Lord Of The Rings story characters.

Listen to the podcast, or watch the podcast video, or read the transcript to learn about these and other interesting PHP topics.

WordPress Tips and Tricks

January 4, 2013 Leave a comment

I have some Wp tips and tricks

  • When you do a return in a post or page, you always get a double space. If you want it single, simply press on your keyboard.
  • Creating a powerful password for your admin login is the first step in making your site more secure. The second is to change that password monthly.
  • To get your readers to click through to your full post, stop it at exactly the spot where they will be most curious to read the next sentence. Every post has such a spot (or it should). To take advantage, stop the post there and insert the “read more” tag.
  • If you have unused plugins or themes installed, and have not activated, delete them. This greatly beefs up site security.
  • If you are looking for a WordPress developer to create your site, your first question should be: “Do you know php?” If they claim to be a developer (not a designer), but their answer is no,  run!
  • Don’t use a widget because it’s cool and shiny. Use it because it is useful to your reader.
  • Whether it’s your WordPress blog or website, make sure that people are able to contact you. Don’t hide your contact info in size two font in the footer of the page. Make a separate, highly visible contact page.
  • Remember, it’s WordPress. Capital W, capital P, no space between. If you land on a site and they call themselves a WordPress expert, but spell the name wrong, beware.
  • When inserting a photo into your post or page, don’t forget the alt (alternate) tag. This is what Google looks for when it’s indexing images on the web and the big G doesn’t like a site with alt tags missing.
  • If you have chosen to block search engines in your privacy setting during the construction of your blog or website, remember to turn it back on when you go live. Because that little sucker blocks them good.
  • Keeping your plugins up-to-date is just as important as keeping your WordPress version up-to-date.
  • Do you want to change your homepage to a static page rather than your blog? Can’t figure out what to do? Create a page for your homepage and one for your blog. Then go to settings >reading and change the settings on the “front page displays.”
  • If you are self-hosted, back up your database and all your files regularly. Hear that? Back up, back up!
  • Think about the theme you choose for your blog or website. Does it meet all your needs? Does it allow your site to grow as your business grows? Because if you decide to switch themes down the road, chances are it’s not a simple one-click process.
  • If you fly off the handle or rant in a blog post, remember, the moment you hit that publish button, it appears on the web and to your RSS subscribers. If you are angry when you write a post, it’s always best to save it as a draft and revisit it later for one last look.
  • Use a photo to provoke emotions in your blog post. Not only will you attract more readers, but they will remember your content longer.
  • If you have only one row of tools when you are creating a page or post, simply click on the far right button, “show kitchen sink,” and you will get a whole second row of tools.
  • If you are still using the default “admin” for your user name, it’s time to get rid of it. Create a new one, then delete the old one, assigning all posts and pages to your new user name. Otherwise you are giving hackers 50% of your login info.
  • If you cannot find an option on your edit post or page window, check the tab “screen options” in the upper right corner. That feature may be hidden.
  • To expand your editor window, grab the lower right, ridged corner and drag it.
  • Be careful when you underline text. Readers still have a habit of thinking any underlined text is a link.
  • Remember to turn off your comments on static pages. No one wants to comment on your about or contact page.
  • Remove or replace the default blog tagline under your general settings. Otherwise, people will see that generic message that says, “Just Another WordPress Site.”
  • And lastly, don’t be taken in by over-promises.  Like most worthwhile things, WordPress has a learning curve.

Export html to ms excel file in php

January 4, 2013 Leave a comment

In this article,I will explain how to export html to excel(.xls) file. we are going to export an HTML table (or any html data) to a MS Excel document as it is displayed on the HTML page.
it is very easy to export HTML data to excel in PHP. Lets see Below code

<!–?php

if(isset($_POST[‘excel’]) && $_POST[‘excel’])

{

# Download Excel (.xls) File…

header(‘Content-Type: application/force-download’);

header(‘Content-disposition: attachment; filename=ExportHtmlToExcel.xls’);

header(“Pragma: “);

header(“Cache-Control: “);

echo $_POST[‘excel’];

exit();

}

?>

<html>

<head>

<script>

function getHtmlData()

{

$(“#excel”).val(‘<table border=”1″>’+$(“#info”).clone().html()+'</table>’);

return true;

}

</script>

</head>

<title>Export HTML to Excel in PHP</title>

// <![CDATA[
src=’http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js’&gt;
// ]]>

</head>

<body>

<form method=”post” onSubmit=”javascript:return getHtmlData()”>

<table border=”1″ id=”info”>

<tr>

<th>First Name : </th>

Last Name :

</tr>

<tr>

Test First Name

<td>Test Last Name</td>

</tr>

</table>

<input type=”hidden” id=”excel” name=”excel” value=””>

<br><br>

<input type=”submit” value=”Export HTML to Excel”>

</form>

</body>

</html>

 

PHP Image and Audio Upload Function

January 4, 2013 Leave a comment

Function in PHP to upload an image and audio to the MYSQL database and move the uploaded file:

//fileUpload(“location of file”,”table”,”file_name_in_table”,”condition1″,”condition2″,”file type”)

function fileUpload($location,$table,$name,$condition1,$condition2,$T)
{
//image upload
if($T == “I”) :
$new_name = time(). “-”. $_FILES["image"]["name"] ;
$target = $location. $new_name ;

if ((($_FILES["image"]["type"] == “image/gif”) || 
($_FILES["image"]["type"] == “image/png”) ||
($_FILES["image"]["type"] == “image/jpeg”) ||
($_FILES["image"]["type"] == “image/pjpeg”))) { $err = 0; } else { $err = 2; $_SESSION['errorMessage'] = “Invalid file format!!”; } if (file_exists($target)) { $err = 1; $_SESSION['errorMessage'] =
Filename already exists!!”; } if($err!= 1 && $err!=2) { move_uploaded_file($_FILES["image"]["tmp_name"], $target); mysql_query(“UPDATE $table SET $name = ‘$new_name’ WHERE
$condition1=’$condition2′ “) or die(‘Upload error’.mysql_error()); $_SESSION['addMessage'] = “Action succesfully!!”; } endif; //audio upload if($T== “A”) : $new_name = time(). “-”. $_FILES["audio"]["name"] ; $target = $location. $new_name ; if ((($_FILES["audio"]["type"] == “image/gif”) ||
($_FILES["audio"]["type"] == “image/png”) ||
($_FILES["audio"]["type"] == “image/jpeg”) ||
($_FILES["audio"]["type"] == “image/pjpeg”))) { $err = 0; } else { $err = 2; $_SESSION['errorMessage'] = “Invalid file format!!”; } if (file_exists($target)) { $err = 1;
$_SESSION['errorMessage'] = “Filename already exists!!”; } if($err!= 1 && $err!=2) { move_uploaded_file($_FILES["audio"]["tmp_name"], $target); mysql_query(“UPDATE $table SET $name = ‘$new_name’
WHERE $condition1=’$condition2′ “) or die(‘Upload error’.mysql_error()); } endif; }

Upload Cover Photo to Facebook via PHP

January 4, 2013 1 comment

Here is a tutorial to upload a Cover Photo on Facebook via PHP. We will need Facebook Application ID and Secret, and Facebook files from Github.com then upload to your web space only the src  folder. Now create a file called upload.php and upload it to your web space. Open upload.php with notepad and add this code:

<?php
 
ini_set('display_errors', 1);
 error_reporting(E_ALL);

 require 'src/facebook.php';

 $facebook = new Facebook(array(
 'appId' => "xxxxxxxxxxxxxxxxxxx", //Facebook App ID
 'secret' => "xxxxxxxxxxxxxxxxxxx", // Facebook App Secret
 "cookie" => true,
 'fileUpload' => true
 ));

 $user_id = $facebook->getUser();

 if($user_id == 0 || $user_id == "")
 {
 $login_url = $facebook->getLoginUrl(array(
 'redirect_uri' => 'https://selvabalaji.wordpress.com/upload.php?cover='.$_GET['cover'].'', // Replace with your site url
 'scope' => "publish_stream,user_photos"));

 echo "<script type='text/javascript'>top.location.href = '$login_url';</script>";
 exit();
 }

 //get user album
 $albums = $facebook->api("/me/albums");
 $album_id = ""; 
 foreach($albums["data"] as $item){
 if($item["type"] == "cover_photo"){
 $album_id = $item["id"];
 break;
 }
 }

 //set timeline cover atributes 
 $full_image_path = realpath($_GET['cover']);
 $args = array('message' => 'Uploaded from hhttps://selvabalaji.wordpress.com/');
 $args['image'] = '@' . $full_image_path;

 //upload cover photo to Facebook
 $data = $facebook->api("/me/photos", 'post', $args);
 $picture = $facebook->api('/'.$data['id']);

 $fb_image_link = 'http://www.facebook.com/profile.php?preview_cover='.$data['id'].''; //redirect to uploaded facebook cover and change it
 echo "<script type='text/javascript'>top.location.href = '$fb_image_link';</script>";
?>

Now that just type in the URL of your site followed by the name of the image file and you’re done!
Example : http://yoursitename.com/upload.php?cover=selvabalaji.gif