General

Cross domain AJAX using php

Ajax is not allowed to get data from other domains due to some security reason. Well but sometimes we need to fetch data from other website. this can be done through a proxy. A simple proxy server side scripting can enable to fetch the data from other domains and well that’s your cross domain ajax. here is how the php script look like.

<?php
header('Content-type: text/html');
$url = 'http://www.defaultdomain.com';
if(isset($_GET['proxyUrl'])) {
 $url = $_GET['proxyUrl'];
}
$handle = fopen($url, "r");
if ($handle) {
 while (!feof($handle)) {
 $buffer = fgets($handle, 4096);
 echo $buffer;
 }
 fclose($handle);
}
?>

Read the rest of this entry »

The Big gap

Ahhh.. Got so busy in making browser extensions for Facebook and shaping myself for my career. Well couldn’t able to get time for blogging. Well i would post at least one article per week. I’ve redesigned my home page and would change the blog theme as well in few days.  So that’s it guys, in working on facebook extension i’ve learned something called cross domain ajax so will post an article about it today.

Gradient in CSS3

Gradients can be formed in css3 without using an image file. Gradients are two types which are radial and linear. The gradients are supported in webkit and Mozilla browser engine. This post will show you how to code for the CSS gradient to be supported by the major browsers: IE, Firefox 3.6+, Safari, and Chrome.

Syntax:


-webkit-gradient(<type>, <point> [, <radius>]?, <point> [, <radius>]? [, <stop>]*)

 

background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000));
background-image: -moz-linear-gradient(#ccc, #000);

A stop is a function, color-stop, that takes two arguments, the stop value (either a percentage or a number between 0 and 1.0), and a color (any valid CSS color). In addition the shorthand functions from and to are supported. These functions only require a color argument and are equivalent to color-stop(0, ...) and color-stop(1.0, …) respectively.

For radial use radial keyword for type.

For more info about webkit css gradient visit this link

Color Modules in CSS3

In CSS3 there is an additional color module HSL along with RGB. If alpha channel is needed then it has to be delcared as RGBA and HSLA. HSL stands for Hue, Saturation and Lightness. RGB is the combination of Red, Green and Blue colors which are used in monitors. HSL is easy to define color rather than traditional RGB. Hue is the actual color which is defined in degrees from 0 to 360. 0 degree is Red, 120 is Green and 240 is Blue and mathematically 0 and 360 are same so 360 is Red.Hue scale. Read the rest of this entry »

Easy SEO(Search engine optimization) by Meta element

The simple way of optimizing a website to make it visible in the first page of search result of a search engine is to use a meta tag. Meta contents metadata of the web page. Google doesn’t rely fully on meta elements but it shows “description” of the meta element in its search result. Meta elements always goes inside head element, so it wont be displayed in the web page. Meta elements are typically used to specify page description, keywords, author of the document, last modified, etc. All meta element has name or http-equiv attribute and content attribute.


<head>
 <meta name="description" content="Into Future Web" />
 <meta name="keywords" content="HTML5,CSS3,JavaScript" />
 <meta name="author" content="Jeyanth Kumar" />
 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
 </head>

Keywords and description will make the search engine to recognize your webpage for the search queries. For more information about meta element visit w3schools.