What you need to know about adsense

Google is more smart
You may cheat in so many ways but that wont last for long and your whole investment will return into nothing.
With the new AdSense rules, if you got any cash and your account gets banned you have 30 days to return them back then they will force you by law.
Do not place ads on other's sites
If their account(site) get banned yours will also.
Don't place ads below drop down menu's etc..

Ways to increase CPC(Cost Per Click)

  • Wait few days, until ads get older. A new created ad can give low cpc
  • Change your theme, sometimes theme is not well optimized
  • Move ads, if that ad is not giving enough move it, or move them all. More on top, better cpc
  • Meta keywords, they do not get used for seo anymore, google can use them to discover the site type.

They can be used by choosing high cpc keywords using google AdWords tool, either i had better cpc without them.

Working with forms, $_GET - $_POST form submit

This is an intro into php forms for beginners.
What's about this 2 functions? You can handle forms submits(you can't using just html)
First of all let's take an example:
<?php
echo $_GET['name'];
?>
The example above is a get request, to use it type into browser filename.php?name=thecodertips
It will echo out 'thecodertips' into the browser.
What's different between get and post? Get can be shown into url and post not. Get method should not be used when submitting passwords.
Post example:
<?php
echo $_POST['name'];
?>
How to go with post now? There must be a form to submit the request:
<html>
<body>
<form action="" method="post">
<input type="text" name="hi">
<input type="submit">
</form>
<?php
echo $_POST['hi'];
?>
The php code handles the input of the text box with the name 'hi', note! "Box name(name=) should be always same with the post/get name([''])
action="" tells the browse to which file it should submit the data
method="" can be get or post

So far so good, but how to check if user submitted anything or not?
We can use isset, empty.
<?php
// usage: empty, isset, !empty, !isset
if(isset($_GET['name'])){
echo 'your name is '.$_GET['name'];
}
else{
echo 'enter your name';
}
?>
Hope you liked this simple lesson on form handling.

Hashing on php - Best security tips

Hashing on php is a way to encode a string, mostly passwords.
One big mistake would be having the passwords stored in database without being encrypted.
Whenever someone gets access to the database can login directly.
The most used hash types on php are md5, sha1, sha236, sha512. Sha512 is more strong between them.
Md5 hashes can be cracked very fast due to big lists of password combinations.
You can go to a site to decrypt md5, there are many chances that your hash will get cracked, they may have the md5 hash of your password stored into database.
Best tips:

  • Use sha512
  • Strong password
  • Using salts
Let's take an example of sha512
<?php echo hash('sha512', 'mypass'); ?>
Using different letter combinations is better ex gA@2#j,J%19&

Salts

Salt is a secret word which get combined with the password or hash, this method is the best as long as the attacker does not have file read access to read the hash

Salting the password

<?php
$pass = "gj.mgat.5d%GA";
$salt = "wK5&.gdxmja,5";
$pass = $pass.$salt;
$pass = hash('sha512', $pass);
echo $pass;
?>

Salting the hash

<?php
$pass = "gj.mgat.5d%GA";
$salt = "wK5&.gdxmja,5";
$pass = hash('sha512', $pass);
$pass = $pass.$salt;
echo $pass;
?>

Penguin update coming. Removing bad backlinks

Google announced that in few weeks the next pinguin update is coming.
Some sites will get better page rank, some will loose it.
Whatever happens we can do some improvements and not get a page rank 0.
There are lot of stuff we can improve.
Stuff like meta tags, title, 404 links can help on getting more rank but wont cost allot, only if used ex same title, meta tags all pages, having more text on them than google accepts etc.
Removing duplicate content
It can be categories, search, tags that all go to same stuff creating duplicates.
With a simple rule on robots.txt we can nofollow them
User-agent: *
Disallow: /cat
Allow: /
Biggest problem, backlinks All face with traffic from strange sites like adult, hacking etc who are off a different category than our site.
Those kind of links will hurt you the most.
First of all we must collect those links(bad ones) using google webmaster tools, alexa, backlinkwatch, stats page of our blog etc.
We can remove a single post or a whole site
http://badsite.com/bad-post.html
domain:baddomain.com
After creating our list we have to use google disavow to submit the list, those links wont be considered by google anymore, either as google says, links may take weeks to get removed. Last tip and the best is starting right now and creating some quality backlinks

Follow by Email

Like us on Facebook
Follow us on Twitter
Recommend us on Google Plus
Subscribe me on RSS