Tuesday, June 30

How to parse an Adsense Html code for blogspot post


Hello friends ...
Today I am going to tell you about a simple blogspot blog trick.
Many of the bloggers feel of having an having adsense ads in the posts.
By far this can be now achieved from the blogspot edit post options....
But there is an problem with that...

1. Google adsense team allow you only to place three adsense code.
2. By editing blogspot post you will have to forcefully place all 3 adsense code in your blogspot post.
3. Many bloggers just like to place adsense code in just one and topmost post and rest two adsense code in the sidebars etc...

To overcome the problem of placing the adsense code into the blogger post, the first and the foremost thing you will have to do is just get your adsense code which you want to place inside your post .

After getting your code if you directly place this code in your blogpost , you won't get anything out of it.....

First and foremost thing which you will want to do is to parse the Adsense html code...

you will have to remove < tag with &lt;
you will have to remove > tag with &gt;
you will have to remove " tag with &quot;

ADSENSE CODE BEFORE PARSE




<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxx";
/* xxxxxxxxxx, created xxxxxxxxx */
google_ad_slot = "xxxxxxxxxx";
google_ad_width = xxxx;
google_ad_height = xxxxx;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


ADSENSE CODE AFTER PARSE




&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-xxxxxxxxxxxxxxxxxx&quot;;
/* xxxxxxxx, created xxxxxxxx */
google_ad_slot = &quot;xxxxxxxxx&quot;;
google_ad_width = xxx;
google_ad_height = xxx;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;


In my next post I will tell you how to place parsed adsense code in only one and first blogspot post .......

0 comments:

Followers

Archive

 

Money ,Entertainment and Education. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com