Saturday 27 August 2011

Redirect Google images to your Blog(Blogspot and wordpress)

Today Google images has become a popular way to bring search traffic to your website or blog. but the google images has an iframe which stops the viewer to see your website, you just have to click a image on image search and he just have to click Full-size image  to view in full size and download it into your system.

What I am loosing ?
Clicking on your image on google images counts in your stats(number of clicks), but the user may not visit your blog and you may loose chances of ad. clicks on your website. If your website highly depends upon images then you must try this trick.


What we can do to bypass or we can say redirect to the your site or blog with a little bit of javascript hack.
Just copy the code and copy inside your blog's body tag(<body>).  (If you don't know how to open your blogger blog code. In your blogger dashboard click on Design menu of your blog.)

#####################################################
<script language='JavaScript' type='text/JavaScript'>
       if (top.location != self.location) top.location.replace(self.location);
</script>
#####################################################

If you are a wordpress blogger then install this plugin to your blog.



Tuesday 23 August 2011

PHP in HTML | PHP in HTML

TOPIC : PHP in HTML AND HTML in PHP

This is the simple example of inserting PHP in HTML or HTML inside PHP. This is the simple code showing how to insert php code inside an html code. Here is the simple html code and a pic:



###################HTML###########################
<html>
        <head><title>Simple HTML</title></head>
        <body>
                    <h2>Simple HTML</h2>
        </body>
</html>
###################################################


Whenever we want to insert PHP in HTML code we first open php tags( <?php ) and after finishing our PHP code inside HTML, close the php tags ( ?> ). Example of PHP in HTML :

################PHP in HTML######################
<html>
        <head><title>Simple HTML</title></head>
        <body>
                    <h2>Simple HTML</h2>
                    <?php echo 'hello php'; ?>
        </body>
</html>
##################################################

We can also insert HTML in PHP by using php echo statement.The file name should be .php only. For example:

#####################HTML in PHP#################
<?php echo '<h2>HELLO PHP</h2>' ; ?>
##################################################

This was simple tutorial for PHP in HTML.
For more information see php documentation : http://php.about.com/od/learnphp/qt/php_with_html.htm

More Links : DOWNLOAD PHP WALLPAPERS

Friday 19 August 2011

Dynamic HTML(DHTML) tutorial

DHTML allows scripting languages to change variables in a web page's definition language, which in turn affects the look and function of otherwise "static" HTML page content, after the page has been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load.

In this tutorial we will create an application which will create an html element on the fly(i.e. on some event).In this tutorial i am using onmouseover event we can also use onBlur or onclick.

First we will create an html file which is a very basic html file containing some paragraph tags and other elements like textarea and a button. Simply put the name of the javascript function in onmouseover event. your html code should look like this:

#######################HTML#########################script.html
<html>
<head>
<script type="text/javascript" src="script.js" ></script>
</head>
<body>
<h2>Add text to page</h2>
<p><textarea id="textArea" name="textArea"></textarea></p>
<p><input type="button" value="Submit" onmouseover="addNode()" /></p>
</body>
</html>
######################################################

Now we need to create a function in javascipt. In this example function name is addNode().
Create a variable inside the function and put the value of the textArea inside the variable.
Now create a new node by document createTextNode() function and store inside a variable newText.
Use createElement() function to create an HTML element and append the newText on this element(in example the element is the paragraph tag).
Now create a variable docBody and put inside it the body element.
append the previously created elements to docBody using the append child function.
The javascript for the application :

####################JAVASCRIPT####################### script.js
function addNode() {

var inText = document.getElementById("textArea").value;
var newText = document.createTextNode(inText);

var newGraf = document.createElement("p");
newGraf.appendChild(newText);

var docBody = document.getElementsByTagName("body")[0];
docBody.appendChild(newGraf);
return false;
}
#######################################################

Now, open the html file in the your browser. Enter some text.On moving mouse over the button you will see new tag being created on each mouseover.


This is the simple Dynamic HTML(DHTML) tutorial.

Sunday 14 August 2011

Top PHP Frameworks | Best php frameworks

These are the top ten PHP frameworks that are based on the MVC design pattern.

1. Yii

Yii is a component-based high-performance PHP framework for developing large-scale Web applications. Yii is written in strict OOP and comes with thorough class reference and comprehensive tutorials.

2. CodeIgniter



CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks.



  
3. CakePHP


CakePHP is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.




4. PHPDevShell
 
PHPDevShell is an Open Source (GNU/LGPL) Rapid Application Development framework written using only PHP with no Javascript and comes with a complete GUI admin interface.

5. Akelos
top ten PHP frameworks
The Akelos PHP Framework is a web application development platform based on the MVC (Model View Controller) design pattern. Based on good practices.



6. Symfony
Symfony is a web application framework for PHP5 projects.
It aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure.

7. Prado
 The PRADO group is a team of PRADO enthusiasts who develop and promote the PRADO framework and the related projects.


8. Zend
top ten PHP frameworks


Extending the art & spirit of PHP, Zend Framework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase.







9. ZooP
The Zoop Object Oriented Php Framework (The Zoop PHP Framework for short). A framework written in and for php.


10. QPHP



QPHP stands for Quick PHP and is a MVC framework similar as architecture to ASP.NET.

PHP Wallpapers | PHP wallpaper