How Do you Insert Adsense Code?

  • Author
  • #55579

    How do you insert Adsense Code into Php. I have adsense code that begins:


    google_ad_client = “pub-7330089105598518”;
    google_ad_width = 120;
    google_ad_height = 240;
    google_ad_format = “120x240_as”;
    google_ad_type = “text_image”;
    google_ad_channel = “”;
    google_color_border = “99C9FF”;
    google_color_bg = “FFFFFF”;
    google_color_link = “0000FF”;
    google_color_text = “000000”;
    google_color_url = “008000”;
    <script type=”text/javascript”

    I went on google and this is what they said:

    2) You can also implement the code using the ‘include’ function that
    provides. For more information on this, we suggest performing a Google
    search for terms such as “PHP include function.”

    So I went and did a Google Search and this is what was said;

    Assume that you have a standard header file, called “header.php”. To include the header file in a page, use the include() function, like this:


    <?php include(“header.php”); ?>

    <h1>Welcome to my home page</h1>

    <p>Some text</p>


    My Question is I do not see anything that looks like this on my blog. Am I suppose to create <html>,</html>, if it starts with:

    <p class=”MsoNormal”><span style=”font-size: 13.5pt; color: #0033ff”> Kenpo, Kali, Jeet-kune do, Aikoda are all great martial arts that are all great ways to become physically fit. Physical Fitness is the best way to increase your (Hdl), High Density Lippoproteins. Hdl’s pick up excess cholestrol from the bloodstream and carry it back to the liver for excreation from the body. Regular exercise reduces high blood pressure and is a contributing factor in coronary heart disease (CHD),stroke, kidney failure and blindness.<o:p> </o:p></span></p>

    This Code starts with <p and ends with</p>. Where do I start. Confused?



    If you are trying to edit php for your blog template, and insert javascript for adsense then that means you are definitely in the wrong forum. This is the support forum and we run on different software than does.
    If you have downloaded a template from then please go here and ask your question

    (1) We cannot edit our php in our templates; and
    (2) We cannot use javascript (our programming will strip the code right out); and
    (3) We cannot have adsense or other advertising on our blogs.

    If however you do have a blog then you will benefit by reading this post and understanding the differences between and



    hi there,
    I saw few blogs with Firefox/Adwords/Adsense referral button in their widgets, how they do that with Js code from Google ?



    Slim, we’re not allowed Adsense here at currently. Also javascripts are removed from user input due to security concerns as stated by TT. This is discussed in the FAQ posted at the head of the forums as well as already in the forums. Asking said question also means that you owe the moderator a steak dinner. :)

    River, staff has stated that those are adverts and should be reported to staff via feedback as affliate links are also considered against the ToS as you can profit from them. You are allowed a single affliate link though. The ones that you list are probably just normal links instead of the javascripts ones. I know the Firefox folks provide one. I could have sworn that Google did as well.


    Hi Friends,

    recently I found that few Clicks that goes from my blog Locates to

    But Actually I havnt added a link like this!! and how they are getting click here from my blog? (
    Is this a hacker or something or Google does this?? What is This and How to avoid leaving click to these links from personal blogs.

    Any replies..appreciated.
    Bejoys Vijayan



    Is that a Referrer link, or a Click (ie an outgoing link from your blog)? That takes me to a Create a Profile Page on Monster India; did you put a link to your blog in your Monster profile? That could cause it.



    There’s another thread on the forums about this. It’s those adsense adverts that kicks out on occasion to nonlogged in visitors.

    Not sure why they’re showing up all od the sudden as we’ve had teh adverts for many months now.



    I believe this thread is the one that drmike is referring to


    oh drmike,

    I didn’t know you guys were replying to me here..
    sorry! I was not hijacking this thread..
    but what happened? why you are not a moderator now?



    bejoysvijayan: this thread should answer your question –

The topic ‘How Do you Insert Adsense Code?’ is closed to new replies.